|
On Mon, Dec 21, 2009 at 2:26 PM, zweifel <zweifel@gmail.com> wrote:in your C function called by Lua, you get a Lua_State pointer. be
> I am considering this to be related with the stack of lua, and since I am
> always using the same lua state it could be messing around with the previous
> lua stack of parameters. Or shouldn't it be happening?
sure to use this pointer only, and only during the duration of your
call.
In the simple cases, the pointer Lua passes you is the same you
created initially from C; but if you use coroutines anywhere, it could
be a new state, with it's own stack and local frame; but the same
global state, so you must not call an unexpected state. (at least not
without deep understanding of the way they're all intertwined)
--
Javier