diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-03-08 16:11:03 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-03-08 16:11:03 -0300 |
| commit | e19eba72191d045213304960f1e63213cdd50b8b (patch) | |
| tree | ee73f06ab0708381349019f24a4c777270240da7 | |
| parent | bd8b9c94b38ddaa3cd7324cbca98571633e03f91 (diff) | |
| download | lua-e19eba72191d045213304960f1e63213cdd50b8b.tar.gz lua-e19eba72191d045213304960f1e63213cdd50b8b.tar.bz2 lua-e19eba72191d045213304960f1e63213cdd50b8b.zip | |
cannot store `top' in local variables...
| -rw-r--r-- | ldo.c | 7 |
1 files changed, 3 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 1.160 2002/02/14 21:40:13 roberto Exp $ | 2 | ** $Id: ldo.c,v 1.161 2002/03/07 18:14:29 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 | */ |
| @@ -108,7 +108,7 @@ static void luaD_openstack (lua_State *L, StkId pos) { | |||
| 108 | 108 | ||
| 109 | 109 | ||
| 110 | static void dohook (lua_State *L, lua_Debug *ar, lua_Hook hook) { | 110 | static void dohook (lua_State *L, lua_Debug *ar, lua_Hook hook) { |
| 111 | StkId top = L->top; | 111 | L->ci->top = L->top; |
| 112 | luaD_checkstack(L, LUA_MINSTACK); /* ensure minimum stack size */ | 112 | luaD_checkstack(L, LUA_MINSTACK); /* ensure minimum stack size */ |
| 113 | L->allowhooks = 0; /* cannot call hooks inside a hook */ | 113 | L->allowhooks = 0; /* cannot call hooks inside a hook */ |
| 114 | lua_unlock(L); | 114 | lua_unlock(L); |
| @@ -116,7 +116,7 @@ static void dohook (lua_State *L, lua_Debug *ar, lua_Hook hook) { | |||
| 116 | lua_lock(L); | 116 | lua_lock(L); |
| 117 | lua_assert(L->allowhooks == 0); | 117 | lua_assert(L->allowhooks == 0); |
| 118 | L->allowhooks = 1; | 118 | L->allowhooks = 1; |
| 119 | L->top = top; | 119 | L->top = L->ci->top; |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | 122 | ||
| @@ -137,7 +137,6 @@ static void luaD_callHook (lua_State *L, lua_Hook callhook, const char *event) { | |||
| 137 | ar.event = event; | 137 | ar.event = event; |
| 138 | ar._ci = L->ci - L->base_ci; | 138 | ar._ci = L->ci - L->base_ci; |
| 139 | L->ci->pc = NULL; /* function is not active */ | 139 | L->ci->pc = NULL; /* function is not active */ |
| 140 | L->ci->top = L->top + LUA_MINSTACK; | ||
| 141 | dohook(L, &ar, callhook); | 140 | dohook(L, &ar, callhook); |
| 142 | } | 141 | } |
| 143 | } | 142 | } |
