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

Function luaD_call

third-party/lua-5.1.5/src/ldo.c:370–381  ·  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

368** function position.
369*/
370void luaD_call (lua_State *L, StkId func, int nResults) {
371 if (++L->nCcalls >= LUAI_MAXCCALLS) {
372 if (L->nCcalls == LUAI_MAXCCALLS)
373 luaG_runerror(L, "C stack overflow");
374 else if (L->nCcalls >= (LUAI_MAXCCALLS + (LUAI_MAXCCALLS>>3)))
375 luaD_throw(L, LUA_ERRERR); /* error while handing stack error */
376 }
377 if (luaD_precall(L, func, nResults) == PCRLUA) /* is a Lua function? */
378 luaV_execute(L, 1); /* call it */
379 L->nCcalls--;
380 luaC_checkGC(L);
381}
382
383
384static void resume (lua_State *L, void *ud) {

Callers 8

callTMresFunction · 0.70
callTMFunction · 0.70
luaV_executeFunction · 0.70
luaG_errormsgFunction · 0.70
lua_callFunction · 0.70
f_callFunction · 0.70
f_CcallFunction · 0.70
GCTMFunction · 0.70

Calls 4

luaG_runerrorFunction · 0.70
luaD_throwFunction · 0.70
luaD_precallFunction · 0.70
luaV_executeFunction · 0.70

Tested by

no test coverage detected