MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaT_gettmbyobj

Function luaT_gettmbyobj

deps/lua/src/ltm.c:61–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 5

luaV_gettableFunction · 0.85
luaV_settableFunction · 0.85
call_binTMFunction · 0.85
call_orderTMFunction · 0.85
tryfuncTMFunction · 0.85

Calls 1

luaH_getstrFunction · 0.85

Tested by

no test coverage detected