diff options
Diffstat (limited to 'lgc.c')
| -rw-r--r-- | lgc.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lgc.c,v 2.214 2016/11/07 12:38:35 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 2.215.1.2 2017/08/31 16:15:27 roberto Exp $ |
| 3 | ** Garbage Collector | 3 | ** Garbage Collector |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -643,8 +643,9 @@ static void clearkeys (global_State *g, GCObject *l, GCObject *f) { | |||
| 643 | for (n = gnode(h, 0); n < limit; n++) { | 643 | for (n = gnode(h, 0); n < limit; n++) { |
| 644 | if (!ttisnil(gval(n)) && (iscleared(g, gkey(n)))) { | 644 | if (!ttisnil(gval(n)) && (iscleared(g, gkey(n)))) { |
| 645 | setnilvalue(gval(n)); /* remove value ... */ | 645 | setnilvalue(gval(n)); /* remove value ... */ |
| 646 | removeentry(n); /* and remove entry from table */ | ||
| 647 | } | 646 | } |
| 647 | if (ttisnil(gval(n))) /* is entry empty? */ | ||
| 648 | removeentry(n); /* remove entry from table */ | ||
| 648 | } | 649 | } |
| 649 | } | 650 | } |
| 650 | } | 651 | } |
