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

Function iscleared

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

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

Callers 4

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

Calls

no outgoing calls

Tested by

no test coverage detected