MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / clearkeys

Function clearkeys

third-party/lua-5.3.5/src/lgc.c:639–651  ·  view source on GitHub ↗

** clear entries with unmarked keys from all weaktables in list 'l' up ** to element 'f' */

Source from the content-addressed store, hash-verified

637** to element 'f'
638*/
639static 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/*

Callers 1

atomicFunction · 0.70

Calls 2

isclearedFunction · 0.70
removeentryFunction · 0.70

Tested by

no test coverage detected