lua-users home
lua-l archive

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

> IIRC the only time __tostring is called is by tostring(). I've been annoyed
> several times that some other functions such as string.format and
> lua_tostring don't call it. I'd consider it a bug, but the designers may
> disagree...

In Lua 5.2, __tostring will be called by string.format and there will be
luaL_tolstring which respects __tostring.