** this function can be called asynchronous (e.g. during a signal) */
| 54 | ** this function can be called asynchronous (e.g. during a signal) |
| 55 | */ |
| 56 | LUA_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 | |
| 69 | LUA_API lua_Hook lua_gethook (lua_State *L) { |
no outgoing calls
no test coverage detected