[racket] Using _fun for callbacks

From: Eric Dobson (eric.n.dobson at gmail.com)
Date: Sat Dec 8 15:36:46 EST 2012

I am trying to write the ctype for a cfunction and it seems I need to write
a different version depending on if it is going to get called racket->c or
c->racket. I'm not sure how to write the second version.

The (simplified) type of the function is void f(int count, char** strings);

So for racket->c the type is (_fun (strings) (count : _int = (length
strings)) (strings : (_list i _string)) -> _void).

But I don't know how to make it go the other way. My current solution is to
use _pointer and do cblock->list in my actual function, but I was hopefully
that this could be automated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121208/f22b0e40/attachment.html>

Posted on the users mailing list.