lua-users home
lua-l archive

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


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.