[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:03:12 +0200
> This code (see also luaT_gettmbyobj) looks up entry "__call"
> in object's metatable (which has to be a real Lua table),
> and checks that this entry is a function.
> It doesn't check type of object.
> It checks type of metamethod.
You're right, but then you're using lua_call from your __call
metamethod (lightCall), and that's the part I don't understand how
it's supposed to work. Once again, to call any function you'd need a
LUA_TFUNCTION object. One per function, to be more precise. Your
lightCall seems like it's trying to call pointers directly.
Best,
Bogdan