lua-users home
lua-l archive

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


> 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.