lua-users home
lua-l archive

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


Hi. Using Lua 5.0, I see that I must grow the stack before pushing some values. I want to write a little thin wrapper which before pushing a value checks if the stack will overflow. This part of the code will go away in release versions, but it will surely prove handy during debugging. However, I have not seen anything in the Lua reference manual as to check the current stack size. The closest email I've found in the archives is http://lua-users.org/lists/lua-l/2002- 09/msg00163.html, but that doesn't really help me with stack overflow checks. Is this possible? Are programmers meant to always do the right thing and never overflow the stack?