[gambit-list] ffi and u8vectors, s8vectors, ...

Andreas Huber andi at beyond-aggravated.com
Sun Jun 3 02:33:56 EDT 2007


I've been playing around with Gambit's foreign function interface  
today, and the big stumbling block
i've hit is that I cannot easily pass u8vectors to native code, i.e.  
u8vector is not compatible
with (pointer void) or (pointer unsigned-int8).

Is there a chance this might be changed in the future?

I would _not_ want the address of a copy of the bytevector's contents  
to be passed to c-code but a
pointer to the original u8vector's storage location instead.

I am guaranteed that GC will not move my memory for the duration of  
this foreign call, am I not?
(unless of course, scheme is reentered from within that native call,  
in which case all bets are off, right?)

If there's an easier way of accomplishing this already supported I  
would of course love to hear it.

Best regards,


More information about the Gambit-list mailing list