pyo3_ffi/cpython/weakrefobject.rs
1// NB publicly re-exported in `src/weakrefobject.rs`
2#[cfg(not(any(PyPy, GraalPy)))]
3pub struct _PyWeakReference {
4 pub ob_base: crate::PyObject,
5 pub wr_object: *mut crate::PyObject,
6 pub wr_callback: *mut crate::PyObject,
7 pub hash: crate::Py_hash_t,
8 pub wr_prev: *mut crate::PyWeakReference,
9 pub wr_next: *mut crate::PyWeakReference,
10 #[cfg(Py_3_11)]
11 pub vectorcall: Option<crate::vectorcallfunc>,
12 #[cfg(all(Py_3_13, Py_GIL_DISABLED))]
13 pub weakrefs_lock: *mut crate::PyMutex,
14}
15
16// skipped _PyWeakref_GetWeakrefCount
17// skipped _PyWeakref_ClearRef
18// skipped PyWeakRef_GET_OBJECT