lua-users home
lua-l archive

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


> 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