MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaV_lessthan

Function luaV_lessthan

Source/Misc/lua/src/lua.c:15054–15065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15052
15053
15054int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r) {
15055int res;
15056if (ttype(l) != ttype(r))
15057return luaG_ordererror(L, l, r);
15058else if (ttisnumber(l))
15059return luai_numlt(nvalue(l), nvalue(r));
15060else if (ttisstring(l))
15061return l_strcmp(rawtsvalue(l), rawtsvalue(r)) < 0;
15062else if ((res = call_orderTM(L, l, r, TM_LT)) != -1)
15063return res;
15064return luaG_ordererror(L, l, r);
15065}
15066
15067
15068static int lessequal (lua_State *L, const TValue *l, const TValue *r) {

Callers 2

lua_lessthanFunction · 0.85
luaV_executeFunction · 0.85

Calls 3

luaG_ordererrorFunction · 0.85
l_strcmpFunction · 0.85
call_orderTMFunction · 0.85

Tested by

no test coverage detected