aboutsummaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lgc.c b/lgc.c
index 89cdd2c5..1c741a4a 100644
--- a/lgc.c
+++ b/lgc.c
@@ -100,12 +100,13 @@ static void reallymarkobject (global_State *g, GCObject *o);
100 100
101 101
102/* 102/*
103** mark a table entry as dead (therefore removing it from the table) 103** if key is not marked, mark its entry as dead (therefore removing it
104** from the table)
104*/ 105*/
105static void removeentry (Node *n) { 106static void removeentry (Node *n) {
106 lua_assert(ttisnil(gval(n))); 107 lua_assert(ttisnil(gval(n)));
107 if (iscollectable(gkey(n))) 108 if (valiswhite(gkey(n)))
108 setdeadvalue(gkey(n)); /* dead key; remove it */ 109 setdeadvalue(gkey(n)); /* unused and unmarked key; remove it */
109} 110}
110 111
111 112