lua-users home
lua-l archive

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


On Fri, 3 Aug 2007, PA wrote:
>
> With setmetatable, one can assign a metatable per table instance. One the
> other hand, debug.setmetatable seems to assign a metatable per object type,
> not object instance, e.g.:

See paragraph 5 of section 2.8 of the reference manual. Only tables and
userdata have per-value metatables. The other metatables are per-type.

Tony.
-- 
f.a.n.finch  <dot@dotat.at>  http://dotat.at/
IRISH SEA: SOUTHERLY, BACKING NORTHEASTERLY FOR A TIME, 3 OR 4. SLIGHT OR
MODERATE. SHOWERS. MODERATE OR GOOD, OCCASIONALLY POOR.