misc/liblua/ldo.c
changeset 3697 d5b30d6373fc
parent 2812 0a24853de796
equal deleted inserted replaced
3695:c11abf387a7d 3697:d5b30d6373fc
   363 /*
   363 /*
   364 ** Call a function (C or Lua). The function to be called is at *func.
   364 ** Call a function (C or Lua). The function to be called is at *func.
   365 ** The arguments are on the stack, right after the function.
   365 ** The arguments are on the stack, right after the function.
   366 ** When returns, all the results are on the stack, starting at the original
   366 ** When returns, all the results are on the stack, starting at the original
   367 ** function position.
   367 ** function position.
   368 */ 
   368 */
   369 void luaD_call (lua_State *L, StkId func, int nResults) {
   369 void luaD_call (lua_State *L, StkId func, int nResults) {
   370   if (++L->nCcalls >= LUAI_MAXCCALLS) {
   370   if (++L->nCcalls >= LUAI_MAXCCALLS) {
   371     if (L->nCcalls == LUAI_MAXCCALLS)
   371     if (L->nCcalls == LUAI_MAXCCALLS)
   372       luaG_runerror(L, "C stack overflow");
   372       luaG_runerror(L, "C stack overflow");
   373     else if (L->nCcalls >= (LUAI_MAXCCALLS + (LUAI_MAXCCALLS>>3)))
   373     else if (L->nCcalls >= (LUAI_MAXCCALLS + (LUAI_MAXCCALLS>>3)))