diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-01-12 12:19:04 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-01-12 12:19:04 -0200 |
commit | 8faf4d1de2cbda61ae871fc23091deff3672e0fc (patch) | |
tree | c31722dca150cfc776ce5cb92dd771399446631f /table.c | |
parent | 53c0a0f43c5ced8e5f7435aa50f1bfb1e5371992 (diff) | |
download | lua-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** Module to control static tables | 3 | ** Module to control static tables |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_table="$Id: table.c,v 2.24 1994/12/16 15:55:04 roberto Exp roberto $"; | 6 | char *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 | */ |
174 | void lua_pack (void) | 174 | void 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 */ |