[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Stack state on call to C routine
- From: Peter Shook <pshook@...>
- Date: Thu, 31 Jul 2003 09:46:06 -0400
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