MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / clearbykeys

Function clearbykeys

lib/lua/src/lgc.c:725–737  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

723** clear entries with unmarked keys from all weaktables in list 'l'
724*/
725static void clearbykeys (global_State *g, GCObject *l) {
726 for (; l; l = gco2t(l)->gclist) {
727 Table *h = gco2t(l);
728 Node *limit = gnodelast(h);
729 Node *n;
730 for (n = gnode(h, 0); n < limit; n++) {
731 if (iscleared(g, gckeyN(n))) /* unmarked key? */
732 setempty(gval(n)); /* remove entry */
733 if (isempty(gval(n))) /* is entry empty? */
734 clearkey(n); /* clear its key */
735 }
736 }
737}
738
739
740/*

Callers 1

atomicFunction · 0.85

Calls 2

isclearedFunction · 0.85
clearkeyFunction · 0.85

Tested by

no test coverage detected