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

Function luaV_lessequal

freebsd/contrib/openzfs/module/lua/lvm.c:244–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

luaV_executeFunction · 0.85
lua_compareFunction · 0.85

Calls 3

l_strcmpFunction · 0.70
call_orderTMFunction · 0.70
luaG_ordererrorFunction · 0.70

Tested by

no test coverage detected