MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaT_gettmbyobj

Function luaT_gettmbyobj

freebsd/contrib/openzfs/module/lua/ltm.c:62–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61
62const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {
63 Table *mt;
64 switch (ttypenv(o)) {
65 case LUA_TTABLE:
66 mt = hvalue(o)->metatable;
67 break;
68 case LUA_TUSERDATA:
69 mt = uvalue(o)->metatable;
70 break;
71 default:
72 mt = G(L)->mt[ttypenv(o)];
73 }
74 return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject);
75}
76/* END CSTYLED */

Callers 7

luaV_gettableFunction · 0.70
luaV_settableFunction · 0.70
call_binTMFunction · 0.70
luaV_objlenFunction · 0.70
luaV_finishOpFunction · 0.70
tryfuncTMFunction · 0.70
GCTMFunction · 0.70

Calls 1

luaH_getstrFunction · 0.70

Tested by

no test coverage detected