diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-12-16 14:40:07 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-12-16 14:40:07 -0200 |
commit | a051b3323ef6d12677e78ec0a47d1731bd424d38 (patch) | |
tree | 373d529a4df8d94f81f811dcef19627b5e30e2e5 /ldo.c | |
parent | c4e01c568aa498fbf141c13589c3cefdd7d9457e (diff) | |
download | lua-a051b3323ef6d12677e78ec0a47d1731bd424d38.tar.gz lua-a051b3323ef6d12677e78ec0a47d1731bd424d38.tar.bz2 lua-a051b3323ef6d12677e78ec0a47d1731bd424d38.zip |
comments (about hooks vs signals)
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); |