diff options
| -rw-r--r-- | lgc.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -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 | ||
