MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaD_pcall

Function luaD_pcall

third-party/lua-5.2.4/src/ldo.c:595–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

593
594
595int luaD_pcall (lua_State *L, Pfunc func, void *u,
596 ptrdiff_t old_top, ptrdiff_t ef) {
597 int status;
598 CallInfo *old_ci = L->ci;
599 lu_byte old_allowhooks = L->allowhook;
600 unsigned short old_nny = L->nny;
601 ptrdiff_t old_errfunc = L->errfunc;
602 L->errfunc = ef;
603 status = luaD_rawrunprotected(L, func, u);
604 if (status != LUA_OK) { /* an error occurred? */
605 StkId oldtop = restorestack(L, old_top);
606 luaF_close(L, oldtop); /* close possible pending closures */
607 seterrorobj(L, status, oldtop);
608 L->ci = old_ci;
609 L->allowhook = old_allowhooks;
610 L->nny = old_nny;
611 luaD_shrinkstack(L);
612 }
613 L->errfunc = old_errfunc;
614 return status;
615}
616
617
618

Callers 3

luaD_protectedparserFunction · 0.70
lua_pcallkFunction · 0.70
GCTMFunction · 0.70

Calls 4

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

Tested by

no test coverage detected