commit e19eba72191d045213304960f1e63213cdd50b8b
parent bd8b9c94b38ddaa3cd7324cbca98571633e03f91
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Fri, 8 Mar 2002 16:10:41 -0300
cannot store `top' in local variables...
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/ldo.c b/ldo.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldo.c,v 1.160 2002/02/14 21:40:13 roberto Exp $
+** $Id: ldo.c,v 1.161 2002/03/07 18:14:29 roberto Exp roberto $
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
*/
@@ -108,7 +108,7 @@ static void luaD_openstack (lua_State *L, StkId pos) {
static void dohook (lua_State *L, lua_Debug *ar, lua_Hook hook) {
- StkId top = L->top;
+ L->ci->top = L->top;
luaD_checkstack(L, LUA_MINSTACK); /* ensure minimum stack size */
L->allowhooks = 0; /* cannot call hooks inside a hook */
lua_unlock(L);
@@ -116,7 +116,7 @@ static void dohook (lua_State *L, lua_Debug *ar, lua_Hook hook) {
lua_lock(L);
lua_assert(L->allowhooks == 0);
L->allowhooks = 1;
- L->top = top;
+ L->top = L->ci->top;
}
@@ -137,7 +137,6 @@ static void luaD_callHook (lua_State *L, lua_Hook callhook, const char *event) {
ar.event = event;
ar._ci = L->ci - L->base_ci;
L->ci->pc = NULL; /* function is not active */
- L->ci->top = L->top + LUA_MINSTACK;
dohook(L, &ar, callhook);
}
}