[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ask userdata type from Lua
- From: bil til <biltil52@...>
- Date: Sun, 2 Jul 2023 09:08:57 +0200
> 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?)