lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

It seems that I was wrong about this, and you do receive the
lightuserdata in lightCall (I didn't know that), so yes, that would
work after all.


On Tue, Jan 13, 2009 at 12:57 PM, Bogdan Marinescu
<> wrote:
>> sorry, my error. Replace those two lines with:
>> lua_remove(L, 1);
>> return ((lua_CFunction) p)(L);
> I understand, but at this point you have an even bigger problem :)
> lightuserdatas have a "global" metatable, just like strings and other
> elementary types (only "full" userdatas can get per-instance
> metatables). So your lightCall function will be called for all your
> lightuserdata. And from what I can tell the lightCall function doesn't
> get the function name as a parameter, so you won't know what's the
> actual function that you need to call.
> Best,
> Bogdan