[cffi-devel] Passing a struct by value

Luke Crook luke at balooga.com
Tue Jun 6 22:40:48 UTC 2006



I've read: http://article.gmane.org/gmane.lisp.cffi.devel/754 stating that CFFI 
does not support passing structs by value. Unfortunately I need to pass a 
SDL_Color struct *by value* to the SDL_ttf library in order to set the 
character/font color prior to rendering.

I'll need to write some 'glue' code in C to do this conversion. Does anyone have 
any suggestions on the best way I should implement this? A 'wrapper' function in 
a helper DLL that will take the SDL_Color struct pointer from CFFI and call the 
SDL_ttf function passing the struct as a value?

Thanks,
-Luke




More information about the cffi-devel mailing list