[plt-scheme] FFI request: zero-length cvectors
On Feb 15, jk at xylema.org wrote:
> At the moment attempts to allocate zero-length cvectors fail. It
> seems to me that this is unschemely, as every other collection type
> I can think of does allow this.
It's an oversight -- `make-cvector' always tries to malloc space for
the items, and malloc does not like to give zero-length blocks. I
fixed it to avoid mallocing if you want a zero length vector.
(For now, you can use `(cvector <type>)' which will produce zero-size
cvectors.)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!