aboutsummaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-03 09:54:57 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-03 09:54:57 -0300
commit2f4d429071ef6c1fd372bf0bbdf48b09eb5741a9 (patch)
treeee9e714ec28c0d12c2a0241e01015f804719509e /lgc.c
parent27f7bd2e8301213d1b84eecad5c3e5cee35b24eb (diff)
downloadlua-2f4d429071ef6c1fd372bf0bbdf48b09eb5741a9.tar.gz
lua-2f4d429071ef6c1fd372bf0bbdf48b09eb5741a9.tar.bz2
lua-2f4d429071ef6c1fd372bf0bbdf48b09eb5741a9.zip
details (comments)
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 9028a107..692ebc22 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.c,v 2.194 2014/09/03 16:54:41 roberto Exp roberto $ 2** $Id: lgc.c,v 2.195 2014/09/04 18:15:29 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*/
@@ -852,7 +852,7 @@ static GCObject **findlast (GCObject **p) {
852 852
853/* 853/*
854** move all unreachable objects (or 'all' objects) that need 854** move all unreachable objects (or 'all' objects) that need
855** finalization from list 'p' to list 'tobefnz' (to be finalized) 855** finalization from list 'finobj' to list 'tobefnz' (to be finalized)
856*/ 856*/
857static void separatetobefnz (global_State *g, int all) { 857static void separatetobefnz (global_State *g, int all) {
858 GCObject *curr; 858 GCObject *curr;
@@ -863,7 +863,7 @@ static void separatetobefnz (global_State *g, int all) {
863 if (!(iswhite(curr) || all)) /* not being collected? */ 863 if (!(iswhite(curr) || all)) /* not being collected? */
864 p = &curr->next; /* don't bother with it */ 864 p = &curr->next; /* don't bother with it */
865 else { 865 else {
866 *p = curr->next; /* remove 'curr' from "fin" list */ 866 *p = curr->next; /* remove 'curr' from 'finobj' list */
867 curr->next = *lastnext; /* link at the end of 'tobefnz' list */ 867 curr->next = *lastnext; /* link at the end of 'tobefnz' list */
868 *lastnext = curr; 868 *lastnext = curr;
869 lastnext = &curr->next; 869 lastnext = &curr->next;
@@ -891,7 +891,7 @@ void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt) {
891 /* search for pointer pointing to 'o' */ 891 /* search for pointer pointing to 'o' */
892 for (p = &g->allgc; *p != o; p = &(*p)->next) { /* empty */ } 892 for (p = &g->allgc; *p != o; p = &(*p)->next) { /* empty */ }
893 *p = o->next; /* remove 'o' from 'allgc' list */ 893 *p = o->next; /* remove 'o' from 'allgc' list */
894 o->next = g->finobj; /* link it in "fin" list */ 894 o->next = g->finobj; /* link it in 'finobj' list */
895 g->finobj = o; 895 g->finobj = o;
896 l_setbit(o->marked, FINALIZEDBIT); /* mark it as such */ 896 l_setbit(o->marked, FINALIZEDBIT); /* mark it as such */
897 } 897 }