MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / ccall

Function ccall

3rd/lua-5.4.3/src/ldo.c:570–580  ·  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

568** plus increment number of non-yieldable calls).
569*/
570static void ccall (lua_State *L, StkId func, int nResults, int inc) {
571 CallInfo *ci;
572 L->nCcalls += inc;
573 if (l_unlikely(getCcalls(L) >= LUAI_MAXCCALLS))
574 luaE_checkcstack(L);
575 if ((ci = luaD_precall(L, func, nResults)) != NULL) { /* Lua function? */
576 ci->callstatus = CIST_FRESH; /* mark that it is a "fresh" execute */
577 luaV_execute(L, ci); /* call it */
578 }
579 L->nCcalls -= inc;
580}
581
582
583/*

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