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

Function clearkeys

third-party/lua-5.2.4/src/lgc.c:625–636  ·  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

623** to element 'f'
624*/
625static 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/*

Callers 1

atomicFunction · 0.70

Calls 2

isclearedFunction · 0.70
removeentryFunction · 0.70

Tested by

no test coverage detected