[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Stack Debugging
- From: David Manura <dm.lua@...>
- Date: Fri, 9 Jan 2009 23:18:44 -0500
On Fri, Jan 9, 2009 at 10:29 PM, James Rhodes wrote:
> cout << i << ": string : " << lua_tostring(lstack,i) << endl;\
Careful: lua_tostring has side-effects[1] (perhaps the name of this
function is misleading). It's also more correct to do
"if(lua_toboolean(lstack,i) != 0)" .
[1] http://www.lua.org/manual/5.1/manual.html#lua_tolstring