MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaD_pcall

Function luaD_pcall

src/Chain/libraries/glua/ldo.cpp:750–772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

748
749
750int luaD_pcall(lua_State *L, Pfunc func, void *u,
751 ptrdiff_t old_top, ptrdiff_t ef) {
752 int status;
753 CallInfo *old_ci = L->ci;
754 lu_byte old_allowhooks = L->allowhook;
755 unsigned short old_nny = L->nny;
756 ptrdiff_t old_errfunc = L->errfunc;
757 L->errfunc = ef;
758 status = luaD_rawrunprotected(L, func, u);
759 if (L->force_stopping)
760 status = LUA_ERRRUN;
761 if (status != LUA_OK) { /* an error occurred? */
762 StkId oldtop = restorestack(L, old_top);
763 luaF_close(L, oldtop); /* close possible pending closures */
764 seterrorobj(L, status, oldtop);
765 L->ci = old_ci;
766 L->allowhook = old_allowhooks;
767 L->nny = old_nny;
768 luaD_shrinkstack(L);
769 }
770 L->errfunc = old_errfunc;
771 return status;
772}
773
774
775

Callers 3

luaD_protectedparserFunction · 0.85
GCTMFunction · 0.85
lua_pcallkFunction · 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