** 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). */
| 568 | ** plus increment number of non-yieldable calls). |
| 569 | */ |
| 570 | static 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 | /* |
no test coverage detected