[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why could not aquire the metatable for the types of LUA_TNUMBER and LUA_TBOOLEAN?
- From: 孙世龙 sunshilong <sunshilong369@...>
- Date: Sat, 30 Jan 2021 15:42:02 +0800
>that is,there is one single metatable for all numbers.
Sorry for my poor English, I paid too much attention to this sentence
and ignore the later one in the document.
I fully understand it now. Thank you.
On Sat, Jan 30, 2021 at 3:21 PM Dmitry Meyer <me@undef.im> wrote:
>
> On 30/01/2021 09:27, 孙世龙 sunshilong wrote:
> > By default, a value has no metatable, but the
> > string library sets a metatable for the string type
>
> It clearly says that only the string type has a metatable _by default_
> as it is set by the standard library, but it is possible to set
> metatables for numbers, booleans, etc.