** clear entries with unmarked keys from all weaktables in list 'l' up ** to element 'f' */
| 623 | ** to element 'f' |
| 624 | */ |
| 625 | static void clearkeys (global_State *g, GCObject *l, GCObject *f) { |
| 626 | for (; l != f; l = gco2t(l)->gclist) { |
| 627 | Table *h = gco2t(l); |
| 628 | Node *n, *limit = gnodelast(h); |
| 629 | for (n = gnode(h, 0); n < limit; n++) { |
| 630 | if (!ttisnil(gval(n)) && (iscleared(g, gkey(n)))) { |
| 631 | setnilvalue(gval(n)); /* remove value ... */ |
| 632 | removeentry(n); /* and remove entry from table */ |
| 633 | } |
| 634 | } |
| 635 | } |
| 636 | } |
| 637 | |
| 638 | |
| 639 | /* |
no test coverage detected