mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
control of garbage collection is done with Longs, as there can be
more than WORD objects to collect.
This commit is contained in:
parent
53c0a0f43c
commit
8faf4d1de2
5 changed files with 16 additions and 14 deletions
6
tree.c
6
tree.c
|
|
@ -3,7 +3,7 @@
|
|||
** TecCGraf - PUC-Rio
|
||||
*/
|
||||
|
||||
char *rcs_tree="$Id: tree.c,v 1.11 1994/11/25 19:27:03 roberto Exp roberto $";
|
||||
char *rcs_tree="$Id: tree.c,v 1.12 1994/12/20 21:20:36 roberto Exp roberto $";
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
|
@ -78,10 +78,10 @@ TreeNode *lua_constcreate (char *str)
|
|||
** Garbage collection function.
|
||||
** This function traverse the string list freeing unindexed strings
|
||||
*/
|
||||
Word lua_strcollector (void)
|
||||
Long lua_strcollector (void)
|
||||
{
|
||||
StringNode *curr = string_root, *prev = NULL;
|
||||
Word counter = 0;
|
||||
Long counter = 0;
|
||||
while (curr)
|
||||
{
|
||||
StringNode *next = curr->next;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue