2010/3/30 Alex Queiroz asandroq@gmail.com
Hallo,
2010/3/30 Mikael mikael.trash@gmail.com:
You do this, by declaring the passed u8vector as a scheme-object in the c-lambda definition. The memory pointer to the u8vector's contents in the C code is resolved
by
void *u8vectorptr =
___CAST(void*,&___FETCH_U8(___BODY(theu8vectorschemeobjectvariable),___INT(0)));
Remember that the pointer is only to be kept until the next return to Scheme.
AFAIK you do not need the last ___INT().
Cheers,
-alex @asandroq http://www.ventonegro.org/
It seems that ___FECTH__U8 needs two arguments, what do you mean by not needed then? With ___INT(0) it works fine, but is interesting if there is a shorter way to express the same also.
Thanks :)
Álvaro Castro-Castilla