LUA_SETHOOK(3) | Library Functions Manual | LUA_SETHOOK(3) |
lua_sethook
— sets
the debugging hook function, function indicator [-0, +0, -]
#include
<fcntl.h>
int
lua_sethook
(lua_State
*L, lua_Hook f,
int mask,
int count);
lua_sethook
()
sets the debugging hook function.
Argument f is the hook function. mask specifies on which events
the hook will be called: it is formed by a bitwise or of the constants
LUA_MASKCALL
, LUA_MASKRET
,
LUA_MASKLINE
, and
LUA_MASKCOUNT
. The count argument is only meaningful
when the mask includes LUA_MASKCOUNT
. For each
event, the hook is called as explained below:
A hook is disabled by setting mask to zero.
Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.
The lua_sethook
() manual page is based on
Lua Reference Manual 5.1 and was created by Sergey Bronnikov.
July 18, 2022 | Debian |