diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.149 2015/11/13 13:24:26 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.150 2015/11/19 19:16:22 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 | */ |
@@ -242,9 +242,14 @@ void luaD_inctop (lua_State *L) { | |||
242 | /* }================================================================== */ | 242 | /* }================================================================== */ |
243 | 243 | ||
244 | 244 | ||
245 | /* | ||
246 | ** Call a hook for the given event. Make sure there is a hook to be | ||
247 | ** called. (Both 'L->hook' and 'L->hookmask', which triggers this | ||
248 | ** function, can be changed asynchronously by signals.) | ||
249 | */ | ||
245 | void luaD_hook (lua_State *L, int event, int line) { | 250 | void luaD_hook (lua_State *L, int event, int line) { |
246 | lua_Hook hook = L->hook; | 251 | lua_Hook hook = L->hook; |
247 | if (hook && L->allowhook) { | 252 | if (hook && L->allowhook) { /* make sure there is a hook */ |
248 | CallInfo *ci = L->ci; | 253 | CallInfo *ci = L->ci; |
249 | ptrdiff_t top = savestack(L, L->top); | 254 | ptrdiff_t top = savestack(L, L->top); |
250 | ptrdiff_t ci_top = savestack(L, ci->top); | 255 | ptrdiff_t ci_top = savestack(L, ci->top); |