diff options
| -rw-r--r-- | ldo.c | 9 |
1 files changed, 4 insertions, 5 deletions
| @@ -515,14 +515,13 @@ void luaD_call (lua_State *L, StkId func, int nresults) { | |||
| 515 | 515 | ||
| 516 | /* | 516 | /* |
| 517 | ** Similar to 'luaD_call', but does not allow yields during the call. | 517 | ** Similar to 'luaD_call', but does not allow yields during the call. |
| 518 | ** If there is a stack overflow, freeing all CI structures will | ||
| 519 | ** force the subsequent call to invoke 'luaE_extendCI', which then | ||
| 520 | ** will raise any errors. | ||
| 521 | */ | 518 | */ |
| 522 | void luaD_callnoyield (lua_State *L, StkId func, int nResults) { | 519 | void luaD_callnoyield (lua_State *L, StkId func, int nResults) { |
| 523 | incXCcalls(L); | 520 | incXCcalls(L); |
| 524 | if (getCcalls(L) <= CSTACKERR) /* possible stack overflow? */ | 521 | if (getCcalls(L) <= CSTACKERR) { /* possible C stack overflow? */ |
| 525 | luaE_freeCI(L); | 522 | luaE_exitCcall(L); /* to compensate decrement in next call */ |
| 523 | luaE_enterCcall(L); /* check properly */ | ||
| 524 | } | ||
| 526 | luaD_call(L, func, nResults); | 525 | luaD_call(L, func, nResults); |
| 527 | decXCcalls(L); | 526 | decXCcalls(L); |
| 528 | } | 527 | } |
