Debian Codegraph @

src/weakrefobject.rs

raw symbols SCIP
1 use craterust-analyzer cargo pyo3-ffi 0.28.2 crate/::objectrust-analyzer cargo pyo3-ffi 0.28.2 object/::*;
2 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::ffirust-analyzer cargo std https://github.com/rust-lang/rust/library/std ffi/::c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#;
3 #[cfg(not(PyPy))]
4 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/::addr_of_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/addr_of_mut!;
5
6 #[cfg(all(not(PyPy), Py_LIMITED_API, not(GraalPy)))]
7 opaque_structrust-analyzer cargo pyo3-ffi 0.28.2 opaque_struct!!(pub PyWeakReferencerust-analyzer cargo pyo3-ffi 0.28.2 weakrefobject/PyWeakReference#);
8
9 #[cfg(all(not(PyPy), not(Py_LIMITED_API), not(GraalPy)))]
10 pub use craterust-analyzer cargo pyo3-ffi 0.28.2 crate/::_PyWeakReference as PyWeakReference;
11
12 #[cfg_attr(windows, link(name = "pythonXY"))]
13 extern "C" {
14 // TODO: PyO3 is depending on this symbol in `reference.rs`, we should change this and
15 // remove the export as this is a private symbol.
16 pub static mut _PyWeakref_RefTyperust-analyzer cargo pyo3-ffi 0.28.2 _PyWeakref_RefType.: PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#;
17 static mut _PyWeakref_ProxyTyperust-analyzer cargo pyo3-ffi 0.28.2 _PyWeakref_ProxyType.: PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#;
18 static mut _PyWeakref_CallableProxyTyperust-analyzer cargo pyo3-ffi 0.28.2 _PyWeakref_CallableProxyType.: PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#;
19
20 #[cfg(PyPy)]
21 #[link_name = "PyPyWeakref_CheckRef"]
22 pub fn PyWeakref_CheckRef(op: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#;
23
24 #[cfg(PyPy)]
25 #[link_name = "PyPyWeakref_CheckRefExact"]
26 pub fn PyWeakref_CheckRefExact(op: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#;
27
28 #[cfg(PyPy)]
29 #[link_name = "PyPyWeakref_CheckProxy"]
30 pub fn PyWeakref_CheckProxy(op: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#;
31 }
32
33 #[inline]
34 #[cfg(not(PyPy))]
35 pub unsafe fn PyWeakref_CheckRefrust-analyzer cargo pyo3-ffi 0.28.2 weakrefobject/PyWeakref_CheckRef().(op: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# {
36 PyObject_TypeCheckrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject_TypeCheck().(op, addr_of_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/addr_of_mut!!(_PyWeakref_RefTyperust-analyzer cargo pyo3-ffi 0.28.2 _PyWeakref_RefType.))
37 }
38
39 #[inline]
40 #[cfg(not(PyPy))]
41 pub unsafe fn PyWeakref_CheckRefExactrust-analyzer cargo pyo3-ffi 0.28.2 weakrefobject/PyWeakref_CheckRefExact().(op: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# {
42 (Py_TYPErust-analyzer cargo pyo3-ffi 0.28.2 object/Py_TYPE().(op) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/mut_ptr/impl#[`*mut T`][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/mut_ptr/impl#[`*mut T`][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/mut_ptr/impl#[`*mut T`][`PartialEq<Self>`]eq().addr_of_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/addr_of_mut!!(_PyWeakref_RefTyperust-analyzer cargo pyo3-ffi 0.28.2 _PyWeakref_RefType.)) as c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#
43 }
44
45 #[inline]
46 #[cfg(not(PyPy))]
47 pub unsafe fn PyWeakref_CheckProxyrust-analyzer cargo pyo3-ffi 0.28.2 weakrefobject/PyWeakref_CheckProxy().(op: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# {
48 ((Py_TYPErust-analyzer cargo pyo3-ffi 0.28.2 object/Py_TYPE().(op) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/mut_ptr/impl#[`*mut T`][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/mut_ptr/impl#[`*mut T`][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/mut_ptr/impl#[`*mut T`][`PartialEq<Self>`]eq().addr_of_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/addr_of_mut!!(_PyWeakref_ProxyTyperust-analyzer cargo pyo3-ffi 0.28.2 _PyWeakref_ProxyType.))
49 || (Py_TYPErust-analyzer cargo pyo3-ffi 0.28.2 object/Py_TYPE().(op) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/mut_ptr/impl#[`*mut T`][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/mut_ptr/impl#[`*mut T`][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/mut_ptr/impl#[`*mut T`][`PartialEq<Self>`]eq().addr_of_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/addr_of_mut!!(_PyWeakref_CallableProxyTyperust-analyzer cargo pyo3-ffi 0.28.2 _PyWeakref_CallableProxyType.))) as c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#
50 }
51
52 #[inline]
53 pub unsafe fn PyWeakref_Checkrust-analyzer cargo pyo3-ffi 0.28.2 weakrefobject/PyWeakref_Check().(op: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# {
54 (PyWeakref_CheckRefrust-analyzer cargo pyo3-ffi 0.28.2 weakrefobject/PyWeakref_CheckRef().(op) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().0 || PyWeakref_CheckProxyrust-analyzer cargo pyo3-ffi 0.28.2 weakrefobject/PyWeakref_CheckProxy().(op) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().0) as c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#
55 }
56
57 extern "C" {
58 #[cfg_attr(PyPy, link_name = "PyPyWeakref_NewRef")]
59 pub fn PyWeakref_NewRefrust-analyzer cargo pyo3-ffi 0.28.2 PyWeakref_NewRef().(ob: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#, callback: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#;
60 #[cfg_attr(PyPy, link_name = "PyPyWeakref_NewProxy")]
61 pub fn PyWeakref_NewProxyrust-analyzer cargo pyo3-ffi 0.28.2 PyWeakref_NewProxy().(ob: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#, callback: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#;
62 #[cfg_attr(PyPy, link_name = "PyPyWeakref_GetObject")]
63 #[cfg_attr(
64 Py_3_13,
65 deprecated(note = "deprecated since Python 3.13. Use `PyWeakref_GetRef` instead.")
66 )]
67 pub fn PyWeakref_GetObjectrust-analyzer cargo pyo3-ffi 0.28.2 PyWeakref_GetObject().(reference: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#;
68 #[cfg(Py_3_13)]
69 #[cfg_attr(PyPy, link_name = "PyPyWeakref_GetRef")]
70 pub fn PyWeakref_GetRef(reference: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#, pobj: *mut *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#;
71 }