aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-12-16 14:40:07 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-12-16 14:40:07 -0200
commita051b3323ef6d12677e78ec0a47d1731bd424d38 (patch)
tree373d529a4df8d94f81f811dcef19627b5e30e2e5 /ldebug.c
parentc4e01c568aa498fbf141c13589c3cefdd7d9457e (diff)
downloadlua-a051b3323ef6d12677e78ec0a47d1731bd424d38.tar.gz
lua-a051b3323ef6d12677e78ec0a47d1731bd424d38.tar.bz2
lua-a051b3323ef6d12677e78ec0a47d1731bd424d38.zip
comments (about hooks vs signals)
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ldebug.c b/ldebug.c
index da0fd7a4..5daa3c02 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.116 2015/10/22 14:40:47 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.117 2015/11/02 18:48:07 roberto Exp roberto $
3** Debug Interface 3** Debug Interface
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -69,7 +69,13 @@ static void swapextra (lua_State *L) {
69 69
70 70
71/* 71/*
72** this function can be called asynchronous (e.g. during a signal) 72** This function can be called asynchronous (e.g. during a signal).
73** Fields 'oldpc', 'basehookcount', and 'hookcount' (set by
74** 'resethookcount') are for debug only, and it is no problem if they
75** get arbitrary values (causes at most one wrong hook call). 'hookmask'
76** is an atomic value. We assume that pointers are atomic too (e.g., gcc
77** ensures that for all platforms where it runs). Moreover, 'hook' is
78** always checked before being called (see 'luaD_hook').
73*/ 79*/
74LUA_API void lua_sethook (lua_State *L, lua_Hook func, int mask, int count) { 80LUA_API void lua_sethook (lua_State *L, lua_Hook func, int mask, int count) {
75 if (func == NULL || mask == 0) { /* turn off hooks? */ 81 if (func == NULL || mask == 0) { /* turn off hooks? */