MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / lua_pcall

Function lua_pcall

Source/Misc/lua/src/lua.c:2654–2674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2652
2653
2654LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errfunc) {
2655struct CallS c;
2656int status;
2657ptrdiff_t func;
2658lua_lock(L);
2659api_checknelems(L, nargs+1);
2660checkresults(L, nargs, nresults);
2661if (errfunc == 0)
2662func = 0;
2663else {
2664StkId o = index2adr(L, errfunc);
2665api_checkvalidindex(L, o);
2666func = savestack(L, o);
2667}
2668c.func = L->top - (nargs+1); /* function to be called */
2669c.nresults = nresults;
2670status = luaD_pcall(L, f_call, &c, savestack(L, c.func), func);
2671adjustresults(L, nresults);
2672lua_unlock(L);
2673return status;
2674}
2675
2676
2677/*

Callers 7

runCodeMethod · 0.85
luausb_transfer_cbFunction · 0.85
pcallFunction · 0.85
object.hppFile · 0.85
luaB_pcallFunction · 0.85
luaB_xpcallFunction · 0.85
db_debugFunction · 0.85

Calls 2

index2adrFunction · 0.85
luaD_pcallFunction · 0.85

Tested by

no test coverage detected