| 69 | |
| 70 | |
| 71 | static void restore_stack_limit (lua_State *L) { |
| 72 | lua_assert(L->stack_last - L->stack == L->stacksize - EXTRA_STACK - 1); |
| 73 | if (L->size_ci > LUAI_MAXCALLS) { /* there was an overflow? */ |
| 74 | int inuse = cast_int(L->ci - L->base_ci); |
| 75 | if (inuse + 1 < LUAI_MAXCALLS) /* can `undo' overflow? */ |
| 76 | luaD_reallocCI(L, LUAI_MAXCALLS); |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | |
| 81 | static void resetstack (lua_State *L, int status) { |
no test coverage detected