** 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. */
| 521 | ** function position. |
| 522 | */ |
| 523 | void luaD_call(lua_State *L, StkId func, int nResults) { |
| 524 | if (++L->nCcalls >= LUAI_MAXCCALLS) |
| 525 | stackerror(L); |
| 526 | if (!luaD_precall(L, func, nResults)) /* is a Lua function? */ |
| 527 | luaV_execute(L); /* call it */ |
| 528 | L->nCcalls--; |
| 529 | } |
| 530 | |
| 531 | |
| 532 | /* |
no test coverage detected