MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / lua_sethook

Function lua_sethook

third-party/lua-5.2.4/src/ldebug.c:63–75  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

61** this function can be called asynchronous (e.g. during a signal)
62*/
63LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count) {
64 if (func == NULL || mask == 0) { /* turn off hooks? */
65 mask = 0;
66 func = NULL;
67 }
68 if (isLua(L->ci))
69 L->oldpc = L->ci->u.l.savedpc;
70 L->hook = func;
71 L->basehookcount = count;
72 resethookcount(L);
73 L->hookmask = cast_byte(mask);
74 return 1;
75}
76
77
78LUA_API lua_Hook lua_gethook (lua_State *L) {

Callers 3

lstopFunction · 0.70
lactionFunction · 0.70
db_sethookFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected