MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / luaT_gettmbyobj

Function luaT_gettmbyobj

other_src/lua/src/ltm.cpp: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 (ttype(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[ttype(o)];
73 }
74 return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject);
75}
76

Callers 5

tryfuncTMFunction · 0.70
luaV_gettableFunction · 0.70
luaV_settableFunction · 0.70
call_binTMFunction · 0.70
call_orderTMFunction · 0.70

Calls 1

luaH_getstrFunction · 0.70

Tested by

no test coverage detected