lua-users home
lua-l archive

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


> 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