lua-users home
lua-l archive

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


>  Luiz> If you use luaL_setmetatable,
>
> FWIW, I never do this and never advise others to do so, because the fact
> that luaL_setmetatable relies on string keys means it does not give any
> guarantee of uniqueness and relies entirely on module authors to choose
> non-conflicting names.
>

Can you give some more elobarated example, how this might happen, that
string keys would clash?

(you mean e. g., that a Lua user program could define some global
variable with such a metatable string name, and then bad things might
happen?)