MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / lua_sethook

Function lua_sethook

deps/lua/src/ldebug.c:56–66  ·  view source on GitHub ↗

** this function can be called asynchronous (e.g. during a signal) */

Source from the content-addressed store, hash-verified

54** this function can be called asynchronous (e.g. during a signal)
55*/
56LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count) {
57 if (func == NULL || mask == 0) { /* turn off hooks? */
58 mask = 0;
59 func = NULL;
60 }
61 L->hook = func;
62 L->basehookcount = count;
63 resethookcount(L);
64 L->hookmask = cast_byte(mask);
65 return 1;
66}
67
68
69LUA_API lua_Hook lua_gethook (lua_State *L) {

Callers 5

luaMaskCountHookFunction · 0.85
evalGenericCommandFunction · 0.85
lstopFunction · 0.85
lactionFunction · 0.85
db_sethookFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected