[racket] Using _fun for callbacks

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Dec 10 10:07:42 EST 2012

I've run into this, too, and I don't have a better solution right now.

It's not clear to me what happens with fancy argument specifications
when the function description is used for a callback, but I've never
gotten around to sorting it out.

At Sat, 8 Dec 2012 12:36:46 -0800, Eric Dobson wrote:
> 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.
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

Posted on the users mailing list.