MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / luaD_call

Function luaD_call

lua/ldo.c:377–388  ·  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

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

Callers 8

callTMresFunction · 0.85
callTMFunction · 0.85
luaV_executeFunction · 0.85
luaG_errormsgFunction · 0.85
lua_callFunction · 0.85
f_callFunction · 0.85
f_CcallFunction · 0.85
GCTMFunction · 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