[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to make ROMable Lua data
- From: "Bogdan Marinescu" <bogdan.marinescu@...>
- Date: Tue, 13 Jan 2009 12:57:00 +0200
> 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