Returns 1 if `o` is a ResourceVariable. Returns 0 otherwise. Returns -1 if an error occurred.
| 271 | // Returns 0 otherwise. |
| 272 | // Returns -1 if an error occurred. |
| 273 | int IsResourceVariableHelper(PyObject* o) { |
| 274 | static auto* const check_cache = new CachedTypeCheck([](PyObject* to_check) { |
| 275 | return IsInstanceOfRegisteredType(to_check, "ResourceVariable"); |
| 276 | }); |
| 277 | return check_cache->CachedLookup(o); |
| 278 | } |
| 279 | |
| 280 | // Returns 1 if `o` is a ResourceVariable. |
| 281 | // Returns 0 otherwise. |
no test coverage detected