|
Roberto Ierusalimschy wrote:
Wouldn't it be possible to store a pointer the the internal table structure of the metatable that is ssigned to each table/udata? That way the cost of checking wether a metamethod exists would be one pointer lookup and some bit testing wich is negligible (plus maybe some overhead in lua_setmetatable), and we would be able to have our precious __settable ,__gettable and maybe __next metamethods.The metatable itself has these bits. When we modify a table there is no way to know which objects use it as a metatable, so there would be no way to reset their bits.
-- Dimitris