[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Coercion to string does not call metamethod (Was: Lua minus null (-0)
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 9 Jun 2011 17:31:55 -0300
> 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.
- References:
- Re: Lua minus null (-0), Dirk Laurie
- Re: Lua minus null (-0), Everett L Williams II
- Re: Lua minus null (-0), Dirk Laurie
- Re: Lua minus null (-0), David Kastrup
- Re: Lua minus null (-0), Dirk Laurie
- Re: Lua minus null (-0), David Kastrup
- Re: Lua minus null (-0), Dirk Laurie
- Re: Lua minus null (-0), David Kastrup
- Coercion to string does not call metamethod (Was: Lua minus null (-0), Dirk Laurie
- Re: Coercion to string does not call metamethod (Was: Lua minus null (-0), HyperHacker