MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / luaD_pcall

Function luaD_pcall

ThirdParty/lua/lua/ldo.c:636–656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

634
635
636int luaD_pcall (lua_State *L, Pfunc func, void *u,
637 ptrdiff_t old_top, ptrdiff_t ef) {
638 int status;
639 CallInfo *old_ci = L->ci;
640 lu_byte old_allowhooks = L->allowhook;
641 unsigned short old_nny = L->nny;
642 ptrdiff_t old_errfunc = L->errfunc;
643 L->errfunc = ef;
644 status = luaD_rawrunprotected(L, func, u);
645 if (status != LUA_OK) { /* an error occurred? */
646 StkId oldtop = restorestack(L, old_top);
647 luaF_close(L, oldtop); /* close possible pending closures */
648 seterrorobj(L, status, oldtop);
649 L->ci = old_ci;
650 L->allowhook = old_allowhooks;
651 L->nny = old_nny;
652 luaD_shrinkstack(L);
653 }
654 L->errfunc = old_errfunc;
655 return status;
656}
657
658
659

Callers 3

luaD_protectedparserFunction · 0.85
lua_pcallkFunction · 0.85
GCTMFunction · 0.85

Calls 4

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

Tested by

no test coverage detected