summaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lgc.c b/lgc.c
index 3ffc331d..6949b061 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.c,v 1.71 2000/10/05 13:00:17 roberto Exp roberto $ 2** $Id: lgc.c,v 1.72 2000/10/26 12:47:05 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -229,7 +229,7 @@ static void collecttable (lua_State *L) {
229 229
230 230
231static void checktab (lua_State *L, stringtable *tb) { 231static void checktab (lua_State *L, stringtable *tb) {
232 if (tb->nuse < (lint32)(tb->size/4) && tb->size > 10) 232 if (tb->nuse < (luint32)(tb->size/4) && tb->size > 10)
233 luaS_resize(L, tb, tb->size/2); /* table is too big */ 233 luaS_resize(L, tb, tb->size/2); /* table is too big */
234} 234}
235 235
@@ -286,7 +286,7 @@ static void collectudata (lua_State *L, int all) {
286static void checkMbuffer (lua_State *L) { 286static void checkMbuffer (lua_State *L) {
287 if (L->Mbuffsize > MINBUFFER*2) { /* is buffer too big? */ 287 if (L->Mbuffsize > MINBUFFER*2) { /* is buffer too big? */
288 size_t newsize = L->Mbuffsize/2; /* still larger than MINBUFFER */ 288 size_t newsize = L->Mbuffsize/2; /* still larger than MINBUFFER */
289 L->nblocks += (newsize - L->Mbuffsize)*sizeof(char); 289 L->nblocks -= (L->Mbuffsize - newsize)*sizeof(char);
290 L->Mbuffsize = newsize; 290 L->Mbuffsize = newsize;
291 luaM_reallocvector(L, L->Mbuffer, newsize, char); 291 luaM_reallocvector(L, L->Mbuffer, newsize, char);
292 } 292 }