| 6431 | |
| 6432 | |
| 6433 | static void checkSizes (lua_State *L) { |
| 6434 | global_State *g = G(L); |
| 6435 | /* check size of string hash */ |
| 6436 | if (g->strt.nuse < cast(lu_int32, g->strt.size/4) && |
| 6437 | g->strt.size > MINSTRTABSIZE*2) |
| 6438 | luaS_resize(L, g->strt.size/2); /* table is too big */ |
| 6439 | /* check size of buffer */ |
| 6440 | if (luaZ_sizebuffer(&g->buff) > LUA_MINBUFFER*2) { /* buffer too big? */ |
| 6441 | size_t newsize = luaZ_sizebuffer(&g->buff) / 2; |
| 6442 | luaZ_resizebuffer(L, &g->buff, newsize); |
| 6443 | } |
| 6444 | } |
| 6445 | |
| 6446 | |
| 6447 | static void GCTM (lua_State *L) { |
no test coverage detected