lua-users home
lua-l archive

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


On Wed, 7 Nov 2007, David Manura wrote:

I'm not sure what you mean about lua_pcall. Where should I be using it that I don't already?

If lty is string and cvar is a const char *, then after the lua_pop, whether cvar remains valid is undefined. Concerning lua_tostring/lua_tolstring, the reference manual says "Because Lua has garbage collection, there is no guarantee that the pointer returned by lua_tolstring will be valid after the corresponding value is removed from the stack." (though on looking at the 5.1.2 code, it looks ok).

Hmm. That's a pity, I suppose I need a special case for strings. Thanks for bringing it to my attention.

--
http://rrt.sc3d.org/
strike, v.  1. to act, 2. to refuse to act (Turnbull)