MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / call_orderTM

Function call_orderTM

deps/lua/src/lvm.c:190–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188
189
190static int call_orderTM (lua_State *L, const TValue *p1, const TValue *p2,
191 TMS event) {
192 const TValue *tm1 = luaT_gettmbyobj(L, p1, event);
193 const TValue *tm2;
194 if (ttisnil(tm1)) return -1; /* no metamethod? */
195 tm2 = luaT_gettmbyobj(L, p2, event);
196 if (!luaO_rawequalObj(tm1, tm2)) /* different metamethods? */
197 return -1;
198 callTMres(L, L->top, tm1, p1, p2);
199 return !l_isfalse(L->top);
200}
201
202
203static int l_strcmp (const TString *ls, const TString *rs) {

Callers 2

luaV_lessthanFunction · 0.85
lessequalFunction · 0.85

Calls 3

luaT_gettmbyobjFunction · 0.85
luaO_rawequalObjFunction · 0.85
callTMresFunction · 0.85

Tested by

no test coverage detected