Dear Marc,<div><br></div><div>(I'll put the answer to this one in the wiki.)</div><div><br></div><div>In the C world during a Scheme->C call I have a void* byte buffer with a particular integer length. At return to Scheme I want to return this buffer as an u8vector, for the Scheme-app to be able to do u8vector-set!, -ref etc. on it so that the next time I switch back to C, the C code will have the same void* buffer with the updated results in it.</div>

<div><br></div><div>I wish to know:</div><div><br></div><div> * In the C code, how do I wrap a void* + int len into a u8vector persistent/non-movable scmobj?</div><div><br></div><div> * How do I ensure that Scheme will just use this u8v as long as Scheme has a reference to it, and then just dispose of it without it doing any free() or other kind of touching on it.</div>

<div><br></div><div>Thanks,</div><div>Mikael</div><div><br></div>