Debian Codegraph @

src/setobject.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 #[cfg(not(any(Py_LIMITED_API, PyPy, GraalPy)))]
3 use craterust-analyzer cargo pyo3-ffi 0.28.2 crate/::pyportrust-analyzer cargo pyo3-ffi 0.28.2 pyport/::Py_hash_trust-analyzer cargo pyo3-ffi 0.28.2 pyport/Py_hash_t#;
4 use craterust-analyzer cargo pyo3-ffi 0.28.2 crate/::pyportrust-analyzer cargo pyo3-ffi 0.28.2 pyport/::Py_ssize_trust-analyzer cargo pyo3-ffi 0.28.2 pyport/Py_ssize_t#;
5 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#;
6 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!;
7
8 pub const PySet_MINSIZErust-analyzer cargo pyo3-ffi 0.28.2 setobject/PySet_MINSIZE.: usize = 8;
9
10 #[cfg(not(any(Py_LIMITED_API, PyPy, GraalPy)))]
11 #[repr(C)]
12 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debug)]
13 pub struct setentry {
14 pub key: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#,
15 pub hash: Py_hash_t,
16 }
17
18 #[cfg(not(any(Py_LIMITED_API, PyPy, GraalPy)))]
19 #[repr(C)]
20 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debug)]
21 pub struct PySetObject {
22 pub ob_base: PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#,
23 pub fill: Py_ssize_trust-analyzer cargo pyo3-ffi 0.28.2 pyport/Py_ssize_t#,
24 pub used: Py_ssize_trust-analyzer cargo pyo3-ffi 0.28.2 pyport/Py_ssize_t#,
25 pub mask: Py_ssize_trust-analyzer cargo pyo3-ffi 0.28.2 pyport/Py_ssize_t#,
26 pub table: *mut setentry,
27 pub hash: Py_hash_t,
28 pub finger: Py_ssize_trust-analyzer cargo pyo3-ffi 0.28.2 pyport/Py_ssize_t#,
29 pub smalltable: [setentry; PySet_MINSIZErust-analyzer cargo pyo3-ffi 0.28.2 setobject/PySet_MINSIZE.],
30 pub weakreflist: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#,
31 }
32
33 // skipped
34 #[inline]
35 #[cfg(all(not(any(PyPy, GraalPy)), not(Py_LIMITED_API)))]
36 pub unsafe fn PySet_GET_SIZE(so: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> Py_ssize_trust-analyzer cargo pyo3-ffi 0.28.2 pyport/Py_ssize_t# {
37 debug_assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/debug_assert_eq!!(PyAnySet_Check(so), 1);
38 let so = so.cast::<PySetObject>();
39 (*so).used
40 }
41
42 // skipped _PySet_Dummy
43
44 extern "C" {
45 #[cfg(not(Py_LIMITED_API))]
46 #[cfg_attr(PyPy, link_name = "_PyPySet_NextEntry")]
47 pub fn _PySet_NextEntry(
48 set: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#,
49 pos: *mut Py_ssize_trust-analyzer cargo pyo3-ffi 0.28.2 pyport/Py_ssize_t#,
50 key: *mut *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#,
51 hash: *mut superrust-analyzer cargo pyo3-ffi 0.28.2 crate/::Py_hash_trust-analyzer cargo pyo3-ffi 0.28.2 pyport/Py_hash_t#,
52 ) -> c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#;
53
54 // skipped non-limited _PySet_Update
55 }
56
57 #[cfg_attr(windows, link(name = "pythonXY"))]
58 extern "C" {
59 #[cfg_attr(PyPy, link_name = "PyPySet_Type")]
60 pub static mut PySet_Typerust-analyzer cargo pyo3-ffi 0.28.2 PySet_Type.: PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#;
61 #[cfg_attr(PyPy, link_name = "PyPyFrozenSet_Type")]
62 pub static mut PyFrozenSet_Typerust-analyzer cargo pyo3-ffi 0.28.2 PyFrozenSet_Type.: PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#;
63 pub static mut PySetIter_Typerust-analyzer cargo pyo3-ffi 0.28.2 PySetIter_Type.: PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#;
64 }
65
66 extern "C" {
67 #[cfg_attr(PyPy, link_name = "PyPySet_New")]
68 pub fn PySet_Newrust-analyzer cargo pyo3-ffi 0.28.2 PySet_New().(arg1: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#;
69 #[cfg_attr(PyPy, link_name = "PyPyFrozenSet_New")]
70 pub fn PyFrozenSet_Newrust-analyzer cargo pyo3-ffi 0.28.2 PyFrozenSet_New().(arg1: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#;
71
72 #[cfg_attr(PyPy, link_name = "PyPySet_Add")]
73 pub fn PySet_Addrust-analyzer cargo pyo3-ffi 0.28.2 PySet_Add().(set: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#, key: *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#;
74 #[cfg_attr(PyPy, link_name = "PyPySet_Clear")]
75 pub fn PySet_Clearrust-analyzer cargo pyo3-ffi 0.28.2 PySet_Clear().(set: *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#;
76 #[cfg_attr(PyPy, link_name = "PyPySet_Contains")]
77 pub fn PySet_Containsrust-analyzer cargo pyo3-ffi 0.28.2 PySet_Contains().(anyset: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#, key: *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#;
78 #[cfg_attr(PyPy, link_name = "PyPySet_Discard")]
79 pub fn PySet_Discardrust-analyzer cargo pyo3-ffi 0.28.2 PySet_Discard().(set: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#, key: *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#;
80 #[cfg_attr(PyPy, link_name = "PyPySet_Pop")]
81 pub fn PySet_Poprust-analyzer cargo pyo3-ffi 0.28.2 PySet_Pop().(set: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#;
82 #[cfg_attr(PyPy, link_name = "PyPySet_Size")]
83 pub fn PySet_Sizerust-analyzer cargo pyo3-ffi 0.28.2 PySet_Size().(anyset: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> Py_ssize_trust-analyzer cargo pyo3-ffi 0.28.2 pyport/Py_ssize_t#;
84
85 #[cfg(PyPy)]
86 #[link_name = "PyPyFrozenSet_CheckExact"]
87 pub fn PyFrozenSet_CheckExact(ob: *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#;
88 }
89
90 #[inline]
91 #[cfg(not(any(PyPy, GraalPy)))]
92 pub unsafe fn PyFrozenSet_CheckExactrust-analyzer cargo pyo3-ffi 0.28.2 setobject/PyFrozenSet_CheckExact().(ob: *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# {
93 (Py_TYPErust-analyzer cargo pyo3-ffi 0.28.2 object/Py_TYPE().(ob) 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!!(PyFrozenSet_Typerust-analyzer cargo pyo3-ffi 0.28.2 PyFrozenSet_Type.)) as c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#
94 }
95
96 extern "C" {
97 #[cfg(PyPy)]
98 #[link_name = "PyPyFrozenSet_Check"]
99 pub fn PyFrozenSet_Check(ob: *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#;
100 }
101
102 #[inline]
103 #[cfg(not(PyPy))]
104 pub unsafe fn PyFrozenSet_Checkrust-analyzer cargo pyo3-ffi 0.28.2 setobject/PyFrozenSet_Check().(ob: *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# {
105 (Py_TYPErust-analyzer cargo pyo3-ffi 0.28.2 object/Py_TYPE().(ob) 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!!(PyFrozenSet_Typerust-analyzer cargo pyo3-ffi 0.28.2 PyFrozenSet_Type.)
106 || PyType_IsSubtyperust-analyzer cargo pyo3-ffi 0.28.2 PyType_IsSubtype().(Py_TYPErust-analyzer cargo pyo3-ffi 0.28.2 object/Py_TYPE().(ob), addr_of_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/addr_of_mut!!(PyFrozenSet_Typerust-analyzer cargo pyo3-ffi 0.28.2 PyFrozenSet_Type.)) 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#
107 }
108
109 extern "C" {
110 #[cfg(PyPy)]
111 #[link_name = "PyPyAnySet_CheckExact"]
112 pub fn PyAnySet_CheckExact(ob: *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#;
113 }
114
115 #[inline]
116 #[cfg(not(PyPy))]
117 pub unsafe fn PyAnySet_CheckExactrust-analyzer cargo pyo3-ffi 0.28.2 setobject/PyAnySet_CheckExact().(ob: *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# {
118 (Py_TYPErust-analyzer cargo pyo3-ffi 0.28.2 object/Py_TYPE().(ob) 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!!(PySet_Typerust-analyzer cargo pyo3-ffi 0.28.2 PySet_Type.) || Py_TYPErust-analyzer cargo pyo3-ffi 0.28.2 object/Py_TYPE().(ob) 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!!(PyFrozenSet_Typerust-analyzer cargo pyo3-ffi 0.28.2 PyFrozenSet_Type.))
119 as c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#
120 }
121
122 #[inline]
123 pub unsafe fn PyAnySet_Checkrust-analyzer cargo pyo3-ffi 0.28.2 setobject/PyAnySet_Check().(ob: *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# {
124 (PyAnySet_CheckExactrust-analyzer cargo pyo3-ffi 0.28.2 setobject/PyAnySet_CheckExact().(ob) 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
125 || PyType_IsSubtyperust-analyzer cargo pyo3-ffi 0.28.2 PyType_IsSubtype().(Py_TYPErust-analyzer cargo pyo3-ffi 0.28.2 object/Py_TYPE().(ob), addr_of_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/addr_of_mut!!(PySet_Typerust-analyzer cargo pyo3-ffi 0.28.2 PySet_Type.)) 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
126 || PyType_IsSubtyperust-analyzer cargo pyo3-ffi 0.28.2 PyType_IsSubtype().(Py_TYPErust-analyzer cargo pyo3-ffi 0.28.2 object/Py_TYPE().(ob), addr_of_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/addr_of_mut!!(PyFrozenSet_Typerust-analyzer cargo pyo3-ffi 0.28.2 PyFrozenSet_Type.)) 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#
127 }
128
129 #[inline]
130 #[cfg(Py_3_10)]
131 pub unsafe fn PySet_CheckExact(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# {
132 craterust-analyzer cargo pyo3-ffi 0.28.2 crate/::Py_IS_TYPErust-analyzer cargo pyo3-ffi 0.28.2 object/Py_IS_TYPE().(op, addr_of_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/addr_of_mut!!(PySet_Type))
133 }
134
135 extern "C" {
136 #[cfg(PyPy)]
137 #[link_name = "PyPySet_Check"]
138 pub fn PySet_Check(ob: *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#;
139 }
140
141 #[inline]
142 #[cfg(not(PyPy))]
143 pub unsafe fn PySet_Checkrust-analyzer cargo pyo3-ffi 0.28.2 setobject/PySet_Check().(ob: *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# {
144 (Py_TYPErust-analyzer cargo pyo3-ffi 0.28.2 object/Py_TYPE().(ob) 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!!(PySet_Typerust-analyzer cargo pyo3-ffi 0.28.2 PySet_Type.)
145 || PyType_IsSubtyperust-analyzer cargo pyo3-ffi 0.28.2 PyType_IsSubtype().(Py_TYPErust-analyzer cargo pyo3-ffi 0.28.2 object/Py_TYPE().(ob), addr_of_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/addr_of_mut!!(PySet_Typerust-analyzer cargo pyo3-ffi 0.28.2 PySet_Type.)) 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#
146 }