MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_compTM

Function get_compTM

app/redis-6.2.6/deps/lua/src/lvm.c:176–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174
175
176static const TValue *get_compTM (lua_State *L, Table *mt1, Table *mt2,
177 TMS event) {
178 const TValue *tm1 = fasttm(L, mt1, event);
179 const TValue *tm2;
180 if (tm1 == NULL) return NULL; /* no metamethod */
181 if (mt1 == mt2) return tm1; /* same metatables => same metamethods */
182 tm2 = fasttm(L, mt2, event);
183 if (tm2 == NULL) return NULL; /* no metamethod */
184 if (luaO_rawequalObj(tm1, tm2)) /* same metamethods? */
185 return tm1;
186 return NULL;
187}
188
189
190static int call_orderTM (lua_State *L, const TValue *p1, const TValue *p2,

Callers 1

luaV_equalvalFunction · 0.85

Calls 1

luaO_rawequalObjFunction · 0.85

Tested by

no test coverage detected