[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: upcoming changes in Lua 5.2 [was Re: Location of a package]
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 20 Feb 2008 10:38:40 -0300
> Will luaL_tostring invoke a __tostring metamethod on
> userdata or tables? This would make tostring/rawtostring
> somewhat orthogonal to rawget/gettable. More interestingly,
> it would perhaps allow for strings that are not managed by
> Lua...
Yes, luaL_tostring will invoke the __tostring metamethod (like
'tostring' does currently). (But I fail to see how this would allow for
strings not managed by Lua, unless there are other changes. After
all, the final result of the __tostring metamethod should be a string.)
-- Roberto