MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / lua_pcall

Function lua_pcall

other_src/lua/src/lapi.cpp:837–861  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835
836
837LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errfunc) {
838 struct CallS c;
839 int status;
840 ptrdiff_t func;
841 lua_lock(L);
842 api_checknelems(L, nargs+1);
843 checkresults(L, nargs, nresults);
844 if (errfunc == 0) {
845 func = 0;
846 }
847 else if (errfunc == LUA_REGISTRYINDEX) {
848 func = -1;
849 }
850 else {
851 StkId o = index2adr(L, errfunc);
852 api_checkvalidindex(L, o);
853 func = savestack(L, o);
854 }
855 c.func = L->top - (nargs+1); /* function to be called */
856 c.nresults = nresults;
857 status = luaD_pcall(L, f_call, &c, savestack(L, c.func), func);
858 adjustresults(L, nresults);
859 lua_unlock(L);
860 return status;
861}
862
863
864/*

Callers 15

sortFunction · 0.70
db_debugFunction · 0.70
luaB_pcallFunction · 0.70
luaB_xpcallFunction · 0.70
docallFunction · 0.70
dottyFunction · 0.70
handleMethod · 0.50
pendingMethod · 0.50
RunCallInMethod · 0.50
handleMethod · 0.50
createLuaMethod · 0.50
runCallInMethod · 0.50

Calls 2

index2adrFunction · 0.70
luaD_pcallFunction · 0.70

Tested by

no test coverage detected