MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaT_gettmbyobj

Function luaT_gettmbyobj

third-party/lua-5.2.4/src/ltm.c:63–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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