[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Re: How to find out current stack size?
- From: "gradha29oct@... " <gradha29oct@...>
- Date: Mon, 24 Nov 2003 12:28:05 +0100
>it's instructive to read the entire thread starting at
>that message: it mentions lua_checkstack() and
>luaL_checkstack(). also see section 3.2 (The Stack
>and Indices) in the reference manual.
With lua_checkstack() I could always pass 0 in my first call,
retrieve the stack elements with lua_gettop() and assume that
is the whole stack size. I would then need to store that in
some wrapper structure with a lua_state and this value I
guessed. I'd prefer if there was an API call to avoid me
duplicating the stack size in some extra variable.