lua-users home
lua-l archive

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



Peter Shook wrote:
You can push, pop, dup and swap to your heart's content without fear of corrupting it.

Within reason, that is. There is a limit to how many things you can push on the stack. You need to call lua_checkstack if you want to push lots of stuff on the stack. And even lua_checkstack has a limit.

/* minimum Lua stack available to a C function */
#define LUA_MINSTACK	20

/* maximum size for the C stack */
#ifndef LUA_MAXCSTACK
#define LUA_MAXCSTACK        2048
#endif