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