[gambit-list] C-FFI type issues
Bradley Lucier
lucier at math.purdue.edu
Thu Sep 17 00:39:21 EDT 2009
On Thu, 2009-09-17 at 00:02 -0400, Isaac Freeman wrote:
> I've been banging my head on this one for days now... I've even tried
> looking at the resulting C code and passing it through the CPP and
> indent... I can't figure out where this is complaining about and
> why...
>
> http://paste.lisp.org/display/87211
>
> Any hints would be great...
I'm no expert on c-lambda, but ...
___result_voidstar is of type (void *) and
((SDL_Surface*)(___arg1_voidstar))->clip_rect is of type struct
SDL_Rect, and these are not assignment compatible; I think you need to
understand (which I don't) this part of the Gambit manual:
For results of type struct, union, and type, the value assigned
to the variable ‘___result_voidstar’ must be a pointer to a
memory allocated block containing a copy of the result.
Brad
More information about the Gambit-list
mailing list