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

Function get_equalTM

third-party/lua-5.2.4/src/lvm.c:186–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184
185
186static const TValue *get_equalTM (lua_State *L, Table *mt1, Table *mt2,
187 TMS event) {
188 const TValue *tm1 = fasttm(L, mt1, event);
189 const TValue *tm2;
190 if (tm1 == NULL) return NULL; /* no metamethod */
191 if (mt1 == mt2) return tm1; /* same metatables => same metamethods */
192 tm2 = fasttm(L, mt2, event);
193 if (tm2 == NULL) return NULL; /* no metamethod */
194 if (luaV_rawequalobj(tm1, tm2)) /* same metamethods? */
195 return tm1;
196 return NULL;
197}
198
199
200static int call_orderTM (lua_State *L, const TValue *p1, const TValue *p2,

Callers 1

luaV_equalobj_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected