That does help with the freeing requirement, thank you Maxime! The request for this feature, if possible, still stands, because of ergonomic reasons, and also I want to store Scheme strings in a vector that can be resized.
Until then, I will make do with this and the make-vector/vector-copy strategy. ~ Vijay On 8/9/21 1:24 PM, Maxime Devos wrote: > Vijay Marupudi schreef op zo 08-08-2021 om 23:02 [-0500]: >> Thank you for your responses Taylan and Maxime! >> >> My initial reaction to the concern about multithreaded code is similar >> to Taylan. I'm not sure if Guile has multithreading concepts built into >> the compiler. If so, one can only check the length again after a mutex. >> >> Appreciate the malloc, realloc, and free FFI solution. Ideally I >> wouldn't have to do that, but it does work. I have to manually free it >> though. > > You can avoid explicit free by using GC_MALLOC_ATOMIC and GC_REALLOC from > bdw-gc (the C library Guile uses for garbage collection) instead of malloc > and realloc, see <https://hboehm.info/gc/gcinterface.html>. > > Greetings, > Maxme. >