lua-users home
lua-l archive

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

On 19 February 2017 at 20:09, Daurnimator <> wrote:
> On 19 February 2017 at 18:06, Daurnimator <> wrote:
>> e.g. a module that registers a metatable with `luaL_setmetatable`
>> inside of it's `luaopen_` function.
> Oops, I meant luaL_newmetatable here.

And now reading the docs
( I
noticed that luaL_newmetatable *doesn't* do anything if the key
already exists.
This is slightly better for the reloading situation: it means that
things won't break as I mentioned earlier with luaL_checkudata.