** 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). */
| 600 | ** plus increment number of non-yieldable calls). |
| 601 | */ |
| 602 | l_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 | /* |
no test coverage detected