[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: alien attacks SDL
- From: Joshua Jensen <jjensen@...>
- Date: Wed, 03 Sep 2008 22:27:57 -0600
----- Original Message -----
From: Fabio Mascarenhas
Date: 9/3/2008 9:55 PM
I wanted to get around to cleaning the 'cfunction' up, and that's why I
hadn't submitted a patch yet. As I recall, the situation was thus: A C
function required a C callback. The C function was made available via
Alien, and the C callback was made available via Alien. However, I
couldn't hand the Alien-provided C callback function off as a parameter
to the C function.
Joshua, could you explain what you use the type "cfunction" for? Maybe
I can overload one of the current types (pointer or callback) to do
what it does, instead of adding yet another one... and what about the
changes to struct (the "I" format and the extra parameter to userdata
I can provide the exact example tomorrow for both the callback and the
reason (or possibly, non-reason) for the 'I' format parameter.
I'm also not happy about the positioning of the additional 'pos'
argument for the struct.unpack. It should, as the original struct calls
work, exist before the buffer size.
(I also don't like passing the buffer size along... is there a reason it
can't be obtained via lua_objlen()?)