[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: luaL_findtable invoking metamethods
- From: Daurnimator <quae@...>
- Date: Thu, 21 Jul 2016 16:38:41 -0700
I noticed today that luaL_findtable (as used by module() and
luaL_requiref) uses a mix of rawget and settable.
i.e. __index will not be fired, but __newindex will.
This seems inconsistent and suprised me.
I think they should probably be either both raw, or both non-raw.
I think there are a few old module() patterns out there in the wild
that rely on the raw get.
So I guess changing lua_settable() to lua_rawset() would be the best outcome.