MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / luaV_lessthan

Function luaV_lessthan

other_src/lua/src/lvm.cpp:227–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225
226
227int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r) {
228 int res;
229 if (ttype(l) != ttype(r))
230 return luaG_ordererror(L, l, r);
231 else if (ttisnumber(l))
232 return luai_numlt(nvalue(l), nvalue(r));
233 else if (ttisstring(l))
234 return l_strcmp(rawtsvalue(l), rawtsvalue(r)) < 0;
235 else if ((res = call_orderTM(L, l, r, TM_LT)) != -1)
236 return res;
237 return luaG_ordererror(L, l, r);
238}
239
240
241static int lessequal (lua_State *L, const TValue *l, const TValue *r) {

Callers 2

luaV_executeFunction · 0.70
lua_lessthanFunction · 0.70

Calls 3

luaG_ordererrorFunction · 0.70
l_strcmpFunction · 0.70
call_orderTMFunction · 0.70

Tested by

no test coverage detected