MCPcopy Create free account
hub / github.com/NetHack/NetHack / nhl_hookfn

Function nhl_hookfn

src/nhlua.c:3028–3040  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3026
3027#ifdef NHL_SANDBOX
3028staticfn void
3029nhl_hookfn(lua_State *L, lua_Debug *ar UNUSED)
3030{
3031 nhl_user_data *nud;
3032
3033 (void) lua_getallocf(L, (void **) &nud);
3034
3035 if (nud->steps <= NHL_SB_STEPSIZE)
3036 longjmp(nud->jb, 1);
3037
3038 nud->steps -= NHL_SB_STEPSIZE;
3039 nud->statctr++;
3040}
3041#endif
3042
3043staticfn lua_State *

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected