[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Thoughts on lua_checkstack() implicit usage
- From: Peter Cawley <lua@...>
- Date: Fri, 21 Oct 2011 16:32:44 +0100
On Fri, Oct 21, 2011 at 4:00 PM, Arseny Vakhrushev
<arseny.vakhrushev@gmail.com> wrote:
> I am totally comfortable with checking the stack gap. However, it should be explicitly documented how much stack size I need prior to making library calls which use the stack implicitly. Otherwise, it may lead to very rare and subtle error cases.
It is documented in the 5.2 reference manual:
"Several functions in the auxiliary library use internally some extra
stack slots. When a function in the auxiliary library uses less than
five slots, it does not check the stack size; it simply assumes that
there are enough slots. " - http://www.lua.org/work/doc/manual.html#5