From 88ef06f4f3074d54743e178aaf61fa464b2065b4 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Sat, 20 Dec 2014 11:58:15 -0200 Subject: comments were wrong (not updated about several changes) --- lgc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lgc.c b/lgc.c index a3db97b4..185c1d8c 100644 --- 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 */ } -- cgit v1.2.3-55-g6feb