** clear entries with unmarked keys from all weaktables in list 'l' up ** to element 'f' */
| 637 | ** to element 'f' |
| 638 | */ |
| 639 | static void clearkeys (global_State *g, GCObject *l, GCObject *f) { |
| 640 | for (; l != f; l = gco2t(l)->gclist) { |
| 641 | Table *h = gco2t(l); |
| 642 | Node *n, *limit = gnodelast(h); |
| 643 | for (n = gnode(h, 0); n < limit; n++) { |
| 644 | if (!ttisnil(gval(n)) && (iscleared(g, gkey(n)))) { |
| 645 | setnilvalue(gval(n)); /* remove value ... */ |
| 646 | } |
| 647 | if (ttisnil(gval(n))) /* is entry empty? */ |
| 648 | removeentry(n); /* remove entry from table */ |
| 649 | } |
| 650 | } |
| 651 | } |
| 652 | |
| 653 | |
| 654 | /* |
no test coverage detected