lua-users home
lua-l archive

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



Maybe that would be clearer with "Tables and full userdata have
individual metatables".

Thanks.

-- Roberto

Honestly I hadn't read the reference manual that closely. What I read was in the 2nd ed PiL book... Looking at it here it simply says "They have no metatables" - which I obviously missed.

An extra sentence or two describing the metatable functionality of a lightuserdata vs a userdata might help make this a lot more clear? The explanation of motivations/uses for lightuserdata is great already. So just the metatable part is slightly unclear.

In my specific case a "lightuserdata" would've worked. I'm just wrapping C pointers which use their own 'free' functions called by __gc. However I really wanted the full userdata for the individual metatables.

-Dormando