[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Problem with table created from C
- From: Steve Heller <steve@...>
- Date: Mon, 11 Sep 2006 20:42:25 -0500
On Tue, 12 Sep 2006 09:02:52 +0800, "jason zhang"
>From Lua 5.1 manualvoid lua_settop (lua_State *L, int index);Accepts any acceptable index, or 0, and sets the stack top to this index. If the new top is larger than the old one, then the new elements are filled with nil. If index is 0, then all stack elements are removed.
>Why call lua_settop(L,0) ?
To clear any stack entries I don't need. I couldn't find documentation
on how each function affected the stack, so I decided to clear it
after I used it to make sure I didn't have an overflow. Apparently
that isn't a very good idea.