lua-users home
lua-l archive

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

On Oct 21, 2011, at 19:32 , Peter Cawley wrote:

> On Fri, Oct 21, 2011 at 4:00 PM, Arseny Vakhrushev
> <> 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. " -

That's fair enough. Thanks for noting! However, I didn't find anything like this in the Lua 5.1 manual. Anyway, I suppose this policy can be easily applied for Lua 5.1 as well.

// Seny