lua-users home
lua-l archive

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


> If I don't do anything (don't pop values, don't use checkstack and don't
> use lua_settop(L, 0)) I run out of memory, no surprise there.

There is no need to lua_settop(L, 0) if you're in a C function called by Lua.
There is, however, a need to call lua_checkstack/luaL_checkstack if you
use more than 20 stack entries.
 
> How is proper stack handling supposed to be done?

Perhaps rebuilding Lua with LUA_USE_APICHECK on will help pinpoint the problem.