aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-14 10:15:26 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-14 10:15:26 -0300
commit4a925c15521db16853a8d9b0ddc64c8313f17654 (patch)
tree49bdd417e3ae825d26af5d3894f6c3cd3ccbff8a /lapi.c
parentcf531912f233ce0c7151131fb027c046d3beab39 (diff)
downloadlua-4a925c15521db16853a8d9b0ddc64c8313f17654.tar.gz
lua-4a925c15521db16853a8d9b0ddc64c8313f17654.tar.bz2
lua-4a925c15521db16853a8d9b0ddc64c8313f17654.zip
in 'absindex', do not need to call gettop (can inline it)
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c4
1 files 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 @@
1/* 1/*
2** $Id: lapi.c,v 2.127 2010/05/07 18:10:01 roberto Exp roberto $ 2** $Id: lapi.c,v 2.128 2010/05/12 14:09:20 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -142,7 +142,7 @@ LUA_API const lua_Number *lua_version (lua_State *L) {
142LUA_API int lua_absindex (lua_State *L, int idx) { 142LUA_API int lua_absindex (lua_State *L, int idx) {
143 return (idx > 0 || idx <= LUA_REGISTRYINDEX) 143 return (idx > 0 || idx <= LUA_REGISTRYINDEX)
144 ? idx 144 ? idx
145 : lua_gettop(L) + idx + 1; 145 : cast_int(L->top - L->ci->func + idx);
146} 146}
147 147
148 148