[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: does lua_pushstring check stack overflow? (Lua 5.0.2)
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 28 Nov 2005 07:17:08 -0200
In C functions, you're guaranteed to have at least LUA_MINSTACK stack slots.
If you need more, call lua_checkstack.
To quote the manual
When you interact with Lua API, you are responsible for controlling
stack overflow. http://www.lua.org/manual/5.0/manual.html#3.2
No API function tests anything. In C, you're on your own, as in any
other C library. There's no hand-holding. If you need API checks,
recompile Lua (just lapi.c) with the appropriate definition of api_check.