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

Function lua_pcall

third-party/lua-5.1.5/src/lapi.c:805–825  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

803
804
805LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errfunc) {
806 struct CallS c;
807 int status;
808 ptrdiff_t func;
809 lua_lock(L);
810 api_checknelems(L, nargs+1);
811 checkresults(L, nargs, nresults);
812 if (errfunc == 0)
813 func = 0;
814 else {
815 StkId o = index2adr(L, errfunc);
816 api_checkvalidindex(L, o);
817 func = savestack(L, o);
818 }
819 c.func = L->top - (nargs+1); /* function to be called */
820 c.nresults = nresults;
821 status = luaD_pcall(L, f_call, &c, savestack(L, c.func), func);
822 adjustresults(L, nresults);
823 lua_unlock(L);
824 return status;
825}
826
827
828/*

Callers 15

docallFunction · 0.70
dottyFunction · 0.70
luaB_pcallFunction · 0.70
luaB_xpcallFunction · 0.70
db_debugFunction · 0.70
docallFunction · 0.50
l_printFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
db_debugFunction · 0.50
docallFunction · 0.50
l_printFunction · 0.50

Calls 2

index2adrFunction · 0.85
luaD_pcallFunction · 0.70

Tested by

no test coverage detected