aboutsummaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lgc.c b/lgc.c
index e8533052..cada07d9 100644
--- a/lgc.c
+++ b/lgc.c
@@ -497,10 +497,10 @@ static void traverseweakvalue (global_State *g, Table *h) {
497 hasclears = 1; /* table will have to be cleared */ 497 hasclears = 1; /* table will have to be cleared */
498 } 498 }
499 } 499 }
500 if (g->gcstate == GCSatomic && hasclears) 500 if (g->gcstate == GCSpropagate)
501 linkgclist(h, g->weak); /* has to be cleared later */
502 else
503 linkgclist(h, g->grayagain); /* must retraverse it in atomic phase */ 501 linkgclist(h, g->grayagain); /* must retraverse it in atomic phase */
502 else if (hasclears)
503 linkgclist(h, g->weak); /* has to be cleared later */
504} 504}
505 505
506 506