diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.215 2003/02/28 15:42:08 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.216 2003/02/28 19:45:15 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -196,7 +196,7 @@ static void adjust_varargs (lua_State *L, int nfixargs, StkId base) { | |||
196 | setobj2n(luaH_setnum(L, htab, i+1), L->top - actual + i); | 196 | setobj2n(luaH_setnum(L, htab, i+1), L->top - actual + i); |
197 | /* store counter in field `n' */ | 197 | /* store counter in field `n' */ |
198 | setsvalue(&nname, luaS_newliteral(L, "n")); | 198 | setsvalue(&nname, luaS_newliteral(L, "n")); |
199 | setnvalue(luaH_set(L, htab, &nname), actual); | 199 | setnvalue(luaH_set(L, htab, &nname), cast(lua_Number, actual)); |
200 | L->top -= actual; /* remove extra elements from the stack */ | 200 | L->top -= actual; /* remove extra elements from the stack */ |
201 | sethvalue(L->top, htab); | 201 | sethvalue(L->top, htab); |
202 | incr_top(L); | 202 | incr_top(L); |
@@ -251,10 +251,8 @@ StkId luaD_precall (lua_State *L, StkId func) { | |||
251 | L->base = L->ci->base = restorestack(L, funcr) + 1; | 251 | L->base = L->ci->base = restorestack(L, funcr) + 1; |
252 | ci->top = L->top + LUA_MINSTACK; | 252 | ci->top = L->top + LUA_MINSTACK; |
253 | ci->state = CI_C; /* a C function */ | 253 | ci->state = CI_C; /* a C function */ |
254 | if (L->hookmask & LUA_MASKCALL) { | 254 | if (L->hookmask & LUA_MASKCALL) |
255 | luaD_callhook(L, LUA_HOOKCALL, -1); | 255 | luaD_callhook(L, LUA_HOOKCALL, -1); |
256 | ci = L->ci; /* previous call may reallocate `ci' */ | ||
257 | } | ||
258 | lua_unlock(L); | 256 | lua_unlock(L); |
259 | #ifdef LUA_COMPATUPVALUES | 257 | #ifdef LUA_COMPATUPVALUES |
260 | lua_pushupvalues(L); | 258 | lua_pushupvalues(L); |