| 776 | */ |
| 777 | |
| 778 | static void checkSizes (lua_State *L) { |
| 779 | global_State *g = G(L); |
| 780 | if (g->gckind != KGC_EMERGENCY) { /* do not change sizes in emergency */ |
| 781 | int hs = g->strt.size / 2; /* half the size of the string table */ |
| 782 | if (g->strt.nuse < cast(lu_int32, hs)) /* using less than that half? */ |
| 783 | luaS_resize(L, hs); /* halve its size */ |
| 784 | luaZ_freebuffer(L, &g->buff); /* free concatenation buffer */ |
| 785 | } |
| 786 | } |
| 787 | |
| 788 | |
| 789 | static GCObject *udata2finalize (global_State *g) { |
no test coverage detected