commit 88ef06f4f3074d54743e178aaf61fa464b2065b4
parent eb45f3a9b6cb1faa18bd552ae97e9679a4936361
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Sat, 20 Dec 2014 11:57:50 -0200
comments were wrong (not updated about several changes)
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lgc.c b/lgc.c
@@ -1,5 +1,5 @@
/*
-** $Id: lgc.c,v 2.199 2014/10/30 18:53:28 roberto Exp roberto $
+** $Id: lgc.c,v 2.200 2014/11/02 19:19:04 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -705,10 +705,10 @@ static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count);
/*
** sweep at most 'count' elements from a list of GCObjects erasing dead
-** objects, where a dead (not alive) object is one marked with the "old"
-** (non current) white and not fixed; change all non-dead objects back
-** to white, preparing for next collection cycle.
-** When object is a thread, sweep its list of open upvalues too.
+** objects, where a dead object is one marked with the old (non current)
+** white; change all non-dead objects back to white, preparing for next
+** collection cycle. Return where to continue the traversal or NULL if
+** list is finished.
*/
static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count) {
global_State *g = G(L);
@@ -721,7 +721,7 @@ static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count) {
*p = curr->next; /* remove 'curr' from list */
freeobj(L, curr); /* erase 'curr' */
}
- else { /* update marks */
+ else { /* change mark to 'white' */
curr->marked = cast_byte((marked & maskcolors) | white);
p = &curr->next; /* go to next element */
}