[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: HyperHacker <hyperhacker@...>
- Date: Sun, 12 Jun 2011 13:27:59 -0600
On Sun, Jun 12, 2011 at 12:12, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> > In Lua 5.2, __tostring will be called by string.format and there will be
>> > luaL_tolstring which respects __tostring.
>> >
>>
>> That's good, but why a new C method, rather than making lua_tostring use it?
>
> Because __tostring is not a *core* metamethod.
>
>
So what is a core metamethod, and why is this one different?
--
Sent from my toaster.