MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / luaD_pcall

Function luaD_pcall

libraries/AP_Scripting/lua/src/ldo.c:730–750  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

728
729
730int luaD_pcall (lua_State *L, Pfunc func, void *u,
731 ptrdiff_t old_top, ptrdiff_t ef) {
732 int status;
733 CallInfo *old_ci = L->ci;
734 lu_byte old_allowhooks = L->allowhook;
735 unsigned short old_nny = L->nny;
736 ptrdiff_t old_errfunc = L->errfunc;
737 L->errfunc = ef;
738 status = luaD_rawrunprotected(L, func, u);
739 if (status != LUA_OK) { /* an error occurred? */
740 StkId oldtop = restorestack(L, old_top);
741 luaF_close(L, oldtop); /* close possible pending closures */
742 seterrorobj(L, status, oldtop);
743 L->ci = old_ci;
744 L->allowhook = old_allowhooks;
745 L->nny = old_nny;
746 luaD_shrinkstack(L);
747 }
748 L->errfunc = old_errfunc;
749 return status;
750}
751
752
753

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