From 88b306f495fa7034c708c6b75a355a6deee51c58 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 8 Mar 2000 21:19:22 -0300 Subject: some optimizations --- lbuiltin.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'lbuiltin.c') diff --git a/lbuiltin.c b/lbuiltin.c index 3a57e814..3c558886 100644 --- a/lbuiltin.c +++ b/lbuiltin.c @@ -1,5 +1,5 @@ /* -** $Id: lbuiltin.c,v 1.93 2000/02/22 18:12:46 roberto Exp roberto $ +** $Id: lbuiltin.c,v 1.94 2000/03/03 14:58:26 roberto Exp $ ** Built-in functions ** See Copyright Notice in lua.h */ @@ -553,13 +553,8 @@ static int sort_comp (lua_State *L, lua_Object f, const TObject *a, L->top--; return (ttype(L->top) != LUA_T_NIL); } - else { /* a < b? */ - int res; - *(L->top) = *a; - *(L->top+1) = *b; - res = luaV_lessthan(L, L->top, L->top+1); - return res; - } + else /* a < b? */ + return luaV_lessthan(L, a, b, L->top); } static void auxsort (lua_State *L, Hash *a, int l, int u, lua_Object f) { -- cgit v1.2.3-55-g6feb