[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua and C++ (stack)
- From: James McKaskill <jmckaskill@...>
- Date: Sun, 30 May 2010 22:41:54 +1200
I presume getNpc is getting a userdata pointer out of a registry
entry? In which case it will be pushing a value onto the stack. IIRC
the compiler is free to reorder the calls to lua_getinteger and getNpc
since they are non dependent and occur between the same sequence
points. I would try calling lua_getinteger before and caching the
values in a local variables.
James