diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.88 2000/08/29 14:48:16 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.89 2000/08/29 14:57:23 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 | */ |
@@ -109,6 +109,7 @@ void luaD_lineHook (lua_State *L, StkId func, int line, lua_Hook linehook) { | |||
109 | ar.currentline = line; | 109 | ar.currentline = line; |
110 | L->allowhooks = 0; /* cannot call hooks inside a hook */ | 110 | L->allowhooks = 0; /* cannot call hooks inside a hook */ |
111 | (*linehook)(L, &ar); | 111 | (*linehook)(L, &ar); |
112 | LUA_ASSERT(L->allowhooks == 0, "invalid allow"); | ||
112 | L->allowhooks = 1; | 113 | L->allowhooks = 1; |
113 | L->top = old_top; | 114 | L->top = old_top; |
114 | L->Cbase = old_Cbase; | 115 | L->Cbase = old_Cbase; |
@@ -126,6 +127,7 @@ static void luaD_callHook (lua_State *L, StkId func, lua_Hook callhook, | |||
126 | ar.event = event; | 127 | ar.event = event; |
127 | L->allowhooks = 0; /* cannot call hooks inside a hook */ | 128 | L->allowhooks = 0; /* cannot call hooks inside a hook */ |
128 | (*callhook)(L, &ar); | 129 | (*callhook)(L, &ar); |
130 | LUA_ASSERT(L->allowhooks == 0, "invalid allow"); | ||
129 | L->allowhooks = 1; | 131 | L->allowhooks = 1; |
130 | L->top = old_top; | 132 | L->top = old_top; |
131 | L->Cbase = old_Cbase; | 133 | L->Cbase = old_Cbase; |