MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / ccall

Function ccall

xrepo/packages/l/lua/port/lua/src/ldo.c:602–612  ·  view source on GitHub ↗

** Call a function (C or Lua) through C. 'inc' can be 1 (increment ** number of recursive invocations in the C stack) or nyci (the same ** plus increment number of non-yieldable calls). */

Source from the content-addressed store, hash-verified

600** plus increment number of non-yieldable calls).
601*/
602l_sinline void ccall (lua_State *L, StkId func, int nResults, int inc) {
603 CallInfo *ci;
604 L->nCcalls += inc;
605 if (l_unlikely(getCcalls(L) >= LUAI_MAXCCALLS))
606 luaE_checkcstack(L);
607 if ((ci = luaD_precall(L, func, nResults)) != NULL) { /* Lua function? */
608 ci->callstatus = CIST_FRESH; /* mark that it is a "fresh" execute */
609 luaV_execute(L, ci); /* call it */
610 }
611 L->nCcalls -= inc;
612}
613
614
615/*

Callers 3

luaD_callFunction · 0.85
luaD_callnoyieldFunction · 0.85
resumeFunction · 0.85

Calls 3

luaE_checkcstackFunction · 0.85
luaD_precallFunction · 0.85
luaV_executeFunction · 0.85

Tested by

no test coverage detected