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