MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaT_gettmbyobj

Function luaT_gettmbyobj

extlibs/lua/src/ltm.c:71–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70
71const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {
72 Table *mt;
73 switch (ttype(o)) {
74 case LUA_TTABLE:
75 mt = hvalue(o)->metatable;
76 break;
77 case LUA_TUSERDATA:
78 mt = uvalue(o)->metatable;
79 break;
80 default:
81 mt = G(L)->mt[ttype(o)];
82 }
83 return (mt ? luaH_getshortstr(mt, G(L)->tmname[event]) : &G(L)->nilvalue);
84}
85
86
87/*

Callers 8

luaV_finishgetFunction · 0.85
luaV_finishsetFunction · 0.85
luaV_objlenFunction · 0.85
callbinTMFunction · 0.85
prepclosingmethodFunction · 0.85
luaF_newtbcupvalFunction · 0.85
luaD_tryfuncTMFunction · 0.85
GCTMFunction · 0.85

Calls 1

luaH_getshortstrFunction · 0.85

Tested by

no test coverage detected