lua-users home
lua-l archive

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


> On Behalf Of Rob Hoelz
> Sent: maandag 8 oktober 2012 12:27
> 
> I really like this idea! Maybe I should make typical "pluggable" like package.loaders so this can be incorporated?

I could make the typex code return not only the metatable name, but also the metatable itself (both for tables and userdatas). Then you could wrap your Lua code around the c code to implement the complete behavior as desired. No plugging needed.

Do have a question; should the registry be traversed to lookup the metatable for a table? Or should this only be done for a userdata? Traversing the registry is slow.

Thijs