lua-users home
lua-l archive

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

>now that the metatable stuff is in lgdbm.c, what is the reason to still set
>gdbm.metatable in lgdbm.c (since it isn't used in gdbm.lua anymore) ?

To get access to it without having to have a gdbm handle. Or to test whether
a given userdata is a gdbm handle:
        function isgdbm(x) return getmetatable(x)==gdbm.metatable end