[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: How to find out current stack size?
- From: "gradha29oct@... " <gradha29oct@...>
- Date: Sun, 23 Nov 2003 15:15:50 +0100
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
Is this possible? Are programmers meant to always do the right
thing and never overflow the stack?