MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / lessthanothers

Function lessthanothers

3rd/lua-5.4.3/src/lvm.c:520–526  ·  view source on GitHub ↗

** return 'l < r' for non-numbers. */

Source from the content-addressed store, hash-verified

518** return 'l < r' for non-numbers.
519*/
520static int lessthanothers (lua_State *L, const TValue *l, const TValue *r) {
521 lua_assert(!ttisnumber(l) || !ttisnumber(r));
522 if (ttisstring(l) && ttisstring(r)) /* both are strings? */
523 return l_strcmp(tsvalue(l), tsvalue(r)) < 0;
524 else
525 return luaT_callorderTM(L, l, r, TM_LT);
526}
527
528
529/*

Callers 1

luaV_lessthanFunction · 0.85

Calls 2

l_strcmpFunction · 0.85
luaT_callorderTMFunction · 0.85

Tested by

no test coverage detected