MCPcopy Create free account
hub / github.com/pybind/pybind11 / refcount_immortal

Function refcount_immortal

tests/test_class.py:16–19  ·  view source on GitHub ↗
(ob: object)

Source from the content-addressed store, hash-verified

14
15
16def refcount_immortal(ob: object) -> int:
17 if _is_immortal := getattr(sys, "_is_immortal", None):
18 return UINT32MAX if _is_immortal(ob) else sys.getrefcount(ob)
19 return sys.getrefcount(ob)
20
21
22MANAGED_DICT_GET_REFERRERS_SUPPORTED = (

Callers 1

test_class_refcountFunction · 0.85

Calls 1

getattrFunction · 0.85

Tested by

no test coverage detected