lua-users home
lua-l archive

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


So I need a hack that turns multiple OP_GETTABLE into an "OP_MULTIGET", that is:

a.b.c -> OP_MULTIGET a, "b", "c" -> __multiindex(a, "b", "c")

Obviously this is never gonna get added to Lua, as it breaks __index, but it would be so useful when using C/userdata...

(ok tbh it's more like
OP_LOADK "b", 1
OP_LOADK "c", 2
OP_MULTIGET 0, 1, 2
or w/e)