| 429 | |
| 430 | |
| 431 | static void checkSizes (lua_State *L) { |
| 432 | global_State *g = G(L); |
| 433 | /* check size of string hash */ |
| 434 | if (g->strt.nuse < cast(lu_int32, g->strt.size/4) && |
| 435 | g->strt.size > MINSTRTABSIZE*2) |
| 436 | luaS_resize(L, g->strt.size/2); /* table is too big */ |
| 437 | /* check size of buffer */ |
| 438 | if (luaZ_sizebuffer(&g->buff) > LUA_MINBUFFER*2) { /* buffer too big? */ |
| 439 | size_t newsize = luaZ_sizebuffer(&g->buff) / 2; |
| 440 | luaZ_resizebuffer(L, &g->buff, newsize); |
| 441 | } |
| 442 | } |
| 443 | |
| 444 | |
| 445 | static void GCTM (lua_State *L) { |
no test coverage detected