MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaT_gettmbyobj

Function luaT_gettmbyobj

Source/Misc/lua/src/lua.c:9889–9902  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9887
9888
9889const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {
9890Table *mt;
9891switch (ttype(o)) {
9892case LUA_TTABLE:
9893mt = hvalue(o)->metatable;
9894break;
9895case LUA_TUSERDATA:
9896mt = uvalue(o)->metatable;
9897break;
9898default:
9899mt = G(L)->mt[ttype(o)];
9900}
9901return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject);
9902}
9903
9904/*
9905** $Id: lundump.c,v 2.7.1.4 2008/04/04 19:51:41 roberto Exp $

Callers 5

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

Calls 1

luaH_getstrFunction · 0.85

Tested by

no test coverage detected