diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-05-14 10:15:26 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-05-14 10:15:26 -0300 |
| commit | 4a925c15521db16853a8d9b0ddc64c8313f17654 (patch) | |
| tree | 49bdd417e3ae825d26af5d3894f6c3cd3ccbff8a | |
| parent | cf531912f233ce0c7151131fb027c046d3beab39 (diff) | |
| download | lua-4a925c15521db16853a8d9b0ddc64c8313f17654.tar.gz lua-4a925c15521db16853a8d9b0ddc64c8313f17654.tar.bz2 lua-4a925c15521db16853a8d9b0ddc64c8313f17654.zip | |
in 'absindex', do not need to call gettop (can inline it)
| -rw-r--r-- | lapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -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) { | |||
| 142 | LUA_API int lua_absindex (lua_State *L, int idx) { | 142 | LUA_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 | ||
