MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / lua_pcall

Function lua_pcall

deps/lua/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 14

luaSortArrayFunction · 0.85
scriptingInitFunction · 0.85
luaCreateFunctionFunction · 0.85
evalGenericCommandFunction · 0.85
ldbEvalFunction · 0.85
ldbRedisFunction · 0.85
docallFunction · 0.85
dottyFunction · 0.85
luaB_pcallFunction · 0.85
luaB_xpcallFunction · 0.85
json_protect_conversionFunction · 0.85

Calls 2

index2adrFunction · 0.85
luaD_pcallFunction · 0.85

Tested by

no test coverage detected