** 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 */
| 118 | ** being finalized, keep them in keys, but not in values |
| 119 | */ |
| 120 | static 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 | /* |
no outgoing calls
no test coverage detected