MCPcopy Create free account
hub / github.com/F-Stack/f-stack / iscleared

Function iscleared

freebsd/contrib/openzfs/module/lua/lgc.c:120–127  ·  view source on GitHub ↗

** tells whether a key or value can be cleared from a weak ** table. Non-collectable objects are never removed from weak ** tables. Strings behave as `values', so are never removed too. for ** other objects: if really collected, cannot keep them; for objects ** being finalized, keep them in keys, but not in values */

Source from the content-addressed store, hash-verified

118** being finalized, keep them in keys, but not in values
119*/
120static int iscleared (global_State *g, const TValue *o) {
121 if (!iscollectable(o)) return 0;
122 else if (ttisstring(o)) {
123 markobject(g, rawtsvalue(o)); /* strings are `values', so are never weak */
124 return 0;
125 }
126 else return iswhite(gcvalue(o));
127}
128
129
130/*

Callers 4

traverseweakvalueFunction · 0.70
traverseephemeronFunction · 0.70
clearkeysFunction · 0.70
clearvaluesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected