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

Function luaV_lessequal

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

Source from the content-addressed store, hash-verified

241
242
243int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r) {
244 int res;
245 if (ttisnumber(l) && ttisnumber(r))
246 return luai_numle(L, nvalue(l), nvalue(r));
247 else if (ttisstring(l) && ttisstring(r))
248 return l_strcmp(rawtsvalue(l), rawtsvalue(r)) <= 0;
249 else if ((res = call_orderTM(L, l, r, TM_LE)) >= 0) /* first try `le' */
250 return res;
251 else if ((res = call_orderTM(L, r, l, TM_LT)) < 0) /* else try `lt' */
252 luaG_ordererror(L, l, r);
253 return !res;
254}
255
256
257/*

Callers 2

luaV_executeFunction · 0.70
lua_compareFunction · 0.70

Calls 3

l_strcmpFunction · 0.70
call_orderTMFunction · 0.70
luaG_ordererrorFunction · 0.70

Tested by

no test coverage detected