[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Src question
Quoting Matthias Felleisen:
> Ever think about having a function like scheme_make_vector that doesn't
> take a fill? I know for my cases that I am going to have to refill the
> vector with specific values and doing it twice doesn't buy me anything.
>
> [...]
>
> That would make Scheme unsafe because someone could accidentally
> dereference the vector before putting something in.
Since RJA is asking about the C-level interface, maybe he means the
vector is going to be filled by the allocating C function before being
exposed to Scheme code.
For the next release, I've made scheme_make_vector treat a NULL fill
value specially: it doesn't walk the vector installing NULLs. The GC
will ensure that the vector is initially filled with NULL, anyway.
Matthew