Re: Guile FFI: resizable vector problem
Matthew Dempsky <[email protected]> Sat, 31 Jan 2004 13:38:48 +0100
| Newsgroups | gmane.lisp.scheme.pika.devel |
|---|---|
| Message-ID | <[email protected]> |
Andreas Rottmann <[email protected]> writes: > The next thing I ran into: Guile has dropped resizable vectors some > time ago. A rationale can be found in [0]. The argument seems sound to > me, so what about Pika -- won't resizable vectors yield the same > problem wrt to threading? For now, I'll just work around that by > making scm_set_n_vector_elts() create a new vector. Pika's FFI will handle resizable vectors and threading fine because users never get pointers to the vector contents -- they can only do vector-ref and vector-set! operations on them. Having scm_set_n_vector_elts create a new vector and copy elements would be the Right Thing to do for this. -jivera