MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / luaD_call

Function luaD_call

ThirdParty/lua/lua/ldo.c:413–425  ·  view source on GitHub ↗

** Call a function (C or Lua). The function to be called is at *func. ** The arguments are on the stack, right after the function. ** When returns, all the results are on the stack, starting at the original ** function position. */

Source from the content-addressed store, hash-verified

411** function position.
412*/
413void luaD_call (lua_State *L, StkId func, int nResults, int allowyield) {
414 if (++L->nCcalls >= LUAI_MAXCCALLS) {
415 if (L->nCcalls == LUAI_MAXCCALLS)
416 luaG_runerror(L, "C stack overflow");
417 else if (L->nCcalls >= (LUAI_MAXCCALLS + (LUAI_MAXCCALLS>>3)))
418 luaD_throw(L, LUA_ERRERR); /* error while handing stack error */
419 }
420 if (!allowyield) L->nny++;
421 if (!luaD_precall(L, func, nResults)) /* is a Lua function? */
422 luaV_execute(L); /* call it */
423 if (!allowyield) L->nny--;
424 L->nCcalls--;
425}
426
427
428/*

Callers 7

luaV_executeFunction · 0.85
luaT_callTMFunction · 0.85
luaG_errormsgFunction · 0.85
lua_callkFunction · 0.85
f_callFunction · 0.85
lua_pcallkFunction · 0.85
dothecallFunction · 0.85

Calls 4

luaG_runerrorFunction · 0.85
luaD_throwFunction · 0.85
luaD_precallFunction · 0.85
luaV_executeFunction · 0.85

Tested by

no test coverage detected