MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / PyObject_IS_GC

Function PyObject_IS_GC

python3-sys/src/objimpl.rs:89–95  ·  view source on GitHub ↗
(o: *mut PyObject)

Source from the content-addressed store, hash-verified

87#[inline(always)]
88#[cfg(all(not(Py_LIMITED_API), not(Py_3_9)))]
89pub unsafe fn PyObject_IS_GC(o: *mut PyObject) -> c_int {
90 (PyType_IS_GC(Py_TYPE(o)) != 0
91 && match (*Py_TYPE(o)).tp_is_gc {
92 Some(tp_is_gc) => tp_is_gc(o) != 0,
93 None => true,
94 }) as c_int
95}
96
97#[cfg_attr(windows, link(name = "pythonXY"))]
98extern "C" {

Callers

nothing calls this directly

Calls 2

PyType_IS_GCFunction · 0.70
Py_TYPEFunction · 0.70

Tested by

no test coverage detected