aboutsummaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-25 09:50:46 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-25 09:50:46 -0200
commitbdf566a8a32450c2eb6273c8c1a92e2181b6846e (patch)
treeb301da541fbad81034216a6e0465cc381082431e /lgc.c
parentc3c78030f79fdbbb06265d50645e408d60e7798e (diff)
downloadlua-bdf566a8a32450c2eb6273c8c1a92e2181b6846e.tar.gz
lua-bdf566a8a32450c2eb6273c8c1a92e2181b6846e.tar.bz2
lua-bdf566a8a32450c2eb6273c8c1a92e2181b6846e.zip
`name' in comments changed to 'name'
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lgc.c b/lgc.c
index 692ebc22..50e5326f 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.c,v 2.195 2014/09/04 18:15:29 roberto Exp roberto $ 2** $Id: lgc.c,v 2.196 2014/10/03 12:54:37 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*/
@@ -119,14 +119,14 @@ static void removeentry (Node *n) {
119/* 119/*
120** tells whether a key or value can be cleared from a weak 120** tells whether a key or value can be cleared from a weak
121** table. Non-collectable objects are never removed from weak 121** table. Non-collectable objects are never removed from weak
122** tables. Strings behave as `values', so are never removed too. for 122** tables. Strings behave as 'values', so are never removed too. for
123** other objects: if really collected, cannot keep them; for objects 123** other objects: if really collected, cannot keep them; for objects
124** being finalized, keep them in keys, but not in values 124** being finalized, keep them in keys, but not in values
125*/ 125*/
126static int iscleared (global_State *g, const TValue *o) { 126static int iscleared (global_State *g, const TValue *o) {
127 if (!iscollectable(o)) return 0; 127 if (!iscollectable(o)) return 0;
128 else if (ttisstring(o)) { 128 else if (ttisstring(o)) {
129 markobject(g, tsvalue(o)); /* strings are `values', so are never weak */ 129 markobject(g, tsvalue(o)); /* strings are 'values', so are never weak */
130 return 0; 130 return 0;
131 } 131 }
132 else return iswhite(gcvalue(o)); 132 else return iswhite(gcvalue(o));
@@ -1031,7 +1031,7 @@ static lu_mem singlestep (lua_State *L) {
1031 g->GCmemtrav = 0; 1031 g->GCmemtrav = 0;
1032 lua_assert(g->gray); 1032 lua_assert(g->gray);
1033 propagatemark(g); 1033 propagatemark(g);
1034 if (g->gray == NULL) /* no more `gray' objects? */ 1034 if (g->gray == NULL) /* no more gray objects? */
1035 g->gcstate = GCSatomic; /* finish propagate phase */ 1035 g->gcstate = GCSatomic; /* finish propagate phase */
1036 return g->GCmemtrav; /* memory traversed in this step */ 1036 return g->GCmemtrav; /* memory traversed in this step */
1037 } 1037 }