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

Function clearbykeys

third-party/lua-5.5.0/src/lgc.c:789–801  ·  view source on GitHub ↗

** clear entries with unmarked keys from all weaktables in list 'l' */

Source from the content-addressed store, hash-verified

787** clear entries with unmarked keys from all weaktables in list 'l'
788*/
789static void clearbykeys (global_State *g, GCObject *l) {
790 for (; l; l = gco2t(l)->gclist) {
791 Table *h = gco2t(l);
792 Node *limit = gnodelast(h);
793 Node *n;
794 for (n = gnode(h, 0); n < limit; n++) {
795 if (iscleared(g, gckeyN(n))) /* unmarked key? */
796 setempty(gval(n)); /* remove entry */
797 if (isempty(gval(n))) /* is entry empty? */
798 clearkey(n); /* clear its key */
799 }
800 }
801}
802
803
804/*

Callers 1

atomicFunction · 0.70

Calls 2

isclearedFunction · 0.70
clearkeyFunction · 0.70

Tested by

no test coverage detected