diff options
Diffstat (limited to 'lbuiltin.c')
-rw-r--r-- | lbuiltin.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbuiltin.c,v 1.93 2000/02/22 18:12:46 roberto Exp roberto $ | 2 | ** $Id: lbuiltin.c,v 1.94 2000/03/03 14:58:26 roberto Exp $ |
3 | ** Built-in functions | 3 | ** Built-in functions |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -553,13 +553,8 @@ static int sort_comp (lua_State *L, lua_Object f, const TObject *a, | |||
553 | L->top--; | 553 | L->top--; |
554 | return (ttype(L->top) != LUA_T_NIL); | 554 | return (ttype(L->top) != LUA_T_NIL); |
555 | } | 555 | } |
556 | else { /* a < b? */ | 556 | else /* a < b? */ |
557 | int res; | 557 | return luaV_lessthan(L, a, b, L->top); |
558 | *(L->top) = *a; | ||
559 | *(L->top+1) = *b; | ||
560 | res = luaV_lessthan(L, L->top, L->top+1); | ||
561 | return res; | ||
562 | } | ||
563 | } | 558 | } |
564 | 559 | ||
565 | static void auxsort (lua_State *L, Hash *a, int l, int u, lua_Object f) { | 560 | static void auxsort (lua_State *L, Hash *a, int l, int u, lua_Object f) { |