aboutsummaryrefslogtreecommitdiff
path: root/table.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1995-01-12 12:19:04 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1995-01-12 12:19:04 -0200
commit8faf4d1de2cbda61ae871fc23091deff3672e0fc (patch)
treec31722dca150cfc776ce5cb92dd771399446631f /table.c
parent53c0a0f43c5ced8e5f7435aa50f1bfb1e5371992 (diff)
downloadlua-8faf4d1de2cbda61ae871fc23091deff3672e0fc.tar.gz
lua-8faf4d1de2cbda61ae871fc23091deff3672e0fc.tar.bz2
lua-8faf4d1de2cbda61ae871fc23091deff3672e0fc.zip
control of garbage collection is done with Longs, as there can be
more than WORD objects to collect.
Diffstat (limited to 'table.c')
-rw-r--r--table.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/table.c b/table.c
index f17f1ca4..85311b21 100644
--- a/table.c
+++ b/table.c
@@ -3,7 +3,7 @@
3** Module to control static tables 3** Module to control static tables
4*/ 4*/
5 5
6char *rcs_table="$Id: table.c,v 2.24 1994/12/16 15:55:04 roberto Exp roberto $"; 6char *rcs_table="$Id: table.c,v 2.25 1994/12/20 21:20:36 roberto Exp roberto $";
7 7
8#include <string.h> 8#include <string.h>
9 9
@@ -173,9 +173,9 @@ void lua_markobject (Object *o)
173*/ 173*/
174void lua_pack (void) 174void lua_pack (void)
175{ 175{
176 static Word block = GARBAGE_BLOCK; /* when garbage collector will be called */ 176 static Long block = GARBAGE_BLOCK; /* when garbage collector will be called */
177 static Word nentity = 0; /* counter of new entities (strings and arrays) */ 177 static Long nentity = 0; /* counter of new entities (strings and arrays) */
178 Word recovered = 0; 178 Long recovered = 0;
179 if (nentity++ < block) return; 179 if (nentity++ < block) return;
180 lua_travstack(lua_markobject); /* mark stack objects */ 180 lua_travstack(lua_markobject); /* mark stack objects */
181 lua_travsymbol(lua_markobject); /* mark symbol table objects */ 181 lua_travsymbol(lua_markobject); /* mark symbol table objects */