| 133 | */ |
| 134 | |
| 135 | void luaE_enterCcall (lua_State *L) { |
| 136 | int ncalls = getCcalls(L); |
| 137 | L->nCcalls--; |
| 138 | if (ncalls <= CSTACKERR) { /* possible overflow? */ |
| 139 | luaE_freeCI(L); /* release unused CIs */ |
| 140 | ncalls = getCcalls(L); /* update call count */ |
| 141 | if (ncalls <= CSTACKERR) { /* still overflow? */ |
| 142 | if (ncalls <= CSTACKERRMARK) /* below error-handling zone? */ |
| 143 | luaD_throw(L, LUA_ERRERR); /* error while handling stack error */ |
| 144 | else if (ncalls >= CSTACKMARK) { |
| 145 | /* not in error-handling zone; raise the error now */ |
| 146 | L->nCcalls = (CSTACKMARK - 1); /* enter error-handling zone */ |
| 147 | luaG_runerror(L, "C stack overflow"); |
| 148 | } |
| 149 | /* else stack is in the error-handling zone; |
| 150 | allow message handler to work */ |
| 151 | } |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | |
| 156 | CallInfo *luaE_extendCI (lua_State *L) { |
no test coverage detected