[plt-scheme] Binding C-Structs Containing Fixed-Size Arrays with the FFI
On 1/27/09 3:06 AM, Henk Boom wrote:
> I don't mean to say your solution is a bad one, but I don't think it
> works in all practical situations like you say it does.
I see. In my case it made sense copy the data even if I knew a better
way to do it. I trust Eli will show us a way to solve the offset pointer
problem. :)
OTOH this method to workaround libffi and "stuff an array into a struct"
does work (and people asked questions about this before). It's just that
it's not clear what to do in the converters for such new ctype (but this
is a problem of scheme/foreign magic and not libffi).
To recapitulate I was thinking about mentioning the
make-cstruct-type/build-list trick in the documentation (not the whole
ctype declaration which is not general enough yet).
--
regards,
Jakub Piotr Cłapa