[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: metatables and things other than userdata
- From: Patrick Rapin <toupie300@...>
- Date: Thu, 25 Aug 2011 22:06:11 +0200
> In fact I find that it only works if a full userdata is tagged with a
> metatable. But that’s not what the docs say.
The documentation in fact explicitly states that only full userdata
and tables can have their own metatable.
The following citation comes from chapter 2.8 of the reference manual 
"Tables and full userdata have individual metatables (although
multiple tables and userdata can share their metatables). Values of
all other types share one single metatable per type; that is, there is
one single metatable for all numbers, one for all strings, etc. "