lua-users home
lua-l archive

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


On Tue, Mar 25, 2014 at 5:11 AM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> The API and VM instructions, like print(), invoke__tostring() automatically.
>
> The core and the API do not call __tostring at all.
> print calls tostring which in turn calls __tostring.
> The libraries may call __tostring via luaL_tolstring.
>
> Bottom line: __tostring is a non-core metamethod.
>

See, I wish it were called throughout :p  Remove tostring() the
function, add a rawstring().  Forgive me father for it has been 3
minutes since I last coerced... *runs*