From 4a925c15521db16853a8d9b0ddc64c8313f17654 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 14 May 2010 10:15:26 -0300 Subject: [PATCH] in 'absindex', do not need to call gettop (can inline it) --- lapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lapi.c b/lapi.c index e32f696d..274802ef 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 2.127 2010/05/07 18:10:01 roberto Exp roberto $ +** $Id: lapi.c,v 2.128 2010/05/12 14:09:20 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -142,7 +142,7 @@ LUA_API const lua_Number *lua_version (lua_State *L) { LUA_API int lua_absindex (lua_State *L, int idx) { return (idx > 0 || idx <= LUA_REGISTRYINDEX) ? idx - : lua_gettop(L) + idx + 1; + : cast_int(L->top - L->ci->func + idx); }