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... -- Isaac Freeman memotype (at) gmail.com "The diversity of mankind is a basic postulate of our knowledge of human beings. But if mankind is diverse and individuated, then how can anyone propose equality as an ideal? Every year, scholars hold Conferences on Equality and call for greater equality, and no one challenges the basic tenet. But what justification can equality find in the nature of man? If each individual is unique, how else can he be made 'equal' to others than by destroying most of what is human in him and reducing human society to the mindless uniformity of the ant heap?" --Murray N. Rothbard
Afficher les réponses par date
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
Hi, Is it the binding for clip_rect? It looks like you're trying to assign a struct value type to pointer ___result_voidstar You either want to allocate storage for a copy of the struct and use a release function (per the c-lambda docs in the Gambit manual), or just use pointers, eg: (define SDL_Surface.clip_rect (c-lambda ((pointer "SDL_Surface")) (pointer (struct "SDL_Rect")) "___result_voidstar = &___arg1->clip_rect;")) ) Of course if you do this you have to be careful managing the lifetime of the containing object so you don't get dangling pointers etc. Hope that helps. Darren 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...
participants (3)
-
Bradley Lucier -
Darren Baker -
Isaac Freeman