MCPcopy Create free account
hub / github.com/F-Stack/f-stack / recover

Function recover

freebsd/contrib/openzfs/module/lua/ldo.c:536–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534
535
536static int recover (lua_State *L, int status) {
537 StkId oldtop;
538 CallInfo *ci = findpcall(L);
539 if (ci == NULL) return 0; /* no recovery point */
540 /* "finish" luaD_pcall */
541 oldtop = restorestack(L, ci->extra);
542 luaF_close(L, oldtop);
543 seterrorobj(L, status, oldtop);
544 L->ci = ci;
545 L->allowhook = ci->u.c.old_allowhook;
546 L->nny = 0; /* should be zero to be yieldable */
547 luaD_shrinkstack(L);
548 L->errfunc = ci->u.c.old_errfunc;
549 ci->callstatus |= CIST_STAT; /* call has error status */
550 ci->u.c.status = status; /* (here it is) */
551 return 1; /* continue running the coroutine */
552}
553
554
555/*

Callers 1

lua_resumeFunction · 0.85

Calls 4

findpcallFunction · 0.85
seterrorobjFunction · 0.85
luaD_shrinkstackFunction · 0.85
luaF_closeFunction · 0.70

Tested by

no test coverage detected