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

Function luaD_pcall

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

Source from the content-addressed store, hash-verified

668
669
670int luaD_pcall (lua_State *L, Pfunc func, void *u,
671 ptrdiff_t old_top, ptrdiff_t ef) {
672 int status;
673 CallInfo *old_ci = L->ci;
674 lu_byte old_allowhooks = L->allowhook;
675 unsigned short old_nny = L->nny;
676 ptrdiff_t old_errfunc = L->errfunc;
677 L->errfunc = ef;
678 status = luaD_rawrunprotected(L, func, u);
679 if (status != LUA_OK) { /* an error occurred? */
680 StkId oldtop = restorestack(L, old_top);
681 luaF_close(L, oldtop); /* close possible pending closures */
682 seterrorobj(L, status, oldtop);
683 L->ci = old_ci;
684 L->allowhook = old_allowhooks;
685 L->nny = old_nny;
686 luaD_shrinkstack(L);
687 }
688 L->errfunc = old_errfunc;
689 return status;
690}
691
692
693

Callers 3

luaD_protectedparserFunction · 0.70
lua_pcallkFunction · 0.70
GCTMFunction · 0.70

Calls 4

seterrorobjFunction · 0.85
luaD_shrinkstackFunction · 0.85
luaD_rawrunprotectedFunction · 0.70
luaF_closeFunction · 0.70

Tested by

no test coverage detected