aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-12-20 11:58:15 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-12-20 11:58:15 -0200
commit88ef06f4f3074d54743e178aaf61fa464b2065b4 (patch)
tree542f7ae58b7415828a9e0ea3e5780243cc9d7d97
parenteb45f3a9b6cb1faa18bd552ae97e9679a4936361 (diff)
downloadlua-88ef06f4f3074d54743e178aaf61fa464b2065b4.tar.gz
lua-88ef06f4f3074d54743e178aaf61fa464b2065b4.tar.bz2
lua-88ef06f4f3074d54743e178aaf61fa464b2065b4.zip
comments were wrong (not updated about several changes)
-rw-r--r--lgc.c12
1 files 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 @@
1/* 1/*
2** $Id: lgc.c,v 2.199 2014/10/30 18:53:28 roberto Exp roberto $ 2** $Id: lgc.c,v 2.200 2014/11/02 19:19:04 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -705,10 +705,10 @@ static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count);
705 705
706/* 706/*
707** sweep at most 'count' elements from a list of GCObjects erasing dead 707** sweep at most 'count' elements from a list of GCObjects erasing dead
708** objects, where a dead (not alive) object is one marked with the "old" 708** objects, where a dead object is one marked with the old (non current)
709** (non current) white and not fixed; change all non-dead objects back 709** white; change all non-dead objects back to white, preparing for next
710** to white, preparing for next collection cycle. 710** collection cycle. Return where to continue the traversal or NULL if
711** When object is a thread, sweep its list of open upvalues too. 711** list is finished.
712*/ 712*/
713static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count) { 713static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count) {
714 global_State *g = G(L); 714 global_State *g = G(L);
@@ -721,7 +721,7 @@ static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count) {
721 *p = curr->next; /* remove 'curr' from list */ 721 *p = curr->next; /* remove 'curr' from list */
722 freeobj(L, curr); /* erase 'curr' */ 722 freeobj(L, curr); /* erase 'curr' */
723 } 723 }
724 else { /* update marks */ 724 else { /* change mark to 'white' */
725 curr->marked = cast_byte((marked & maskcolors) | white); 725 curr->marked = cast_byte((marked & maskcolors) | white);
726 p = &curr->next; /* go to next element */ 726 p = &curr->next; /* go to next element */
727 } 727 }