Re: lua_next() crashing on former LUA_TNONE arguments
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: lua_next() crashing on former LUA_TNONE arguments
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2017年12月16日 09:52:26 -0200
> This won't destroy any of the values on the stack, and it calls any
> user-supplied "__tostring" method. Yes, it relies upon the Lua function
> tostring() to be in the global namespace, but that isn't an issue with my
> code. I also print both the positive and negative stack indecies, which I
> find useful.
You can call 'luaL_tolstring' directly, instead of using 'tostring'.
-- Roberto