Debian Codegraph @

src/descrobject.rs

raw symbols SCIP
1 use craterust-analyzer cargo pyo3-ffi 0.28.2 crate/::methodobjectrust-analyzer cargo pyo3-ffi 0.28.2 methodobject/::PyMethodDefrust-analyzer cargo pyo3-ffi 0.28.2 methodobject/PyMethodDef#;
2 use craterust-analyzer cargo pyo3-ffi 0.28.2 crate/::objectrust-analyzer cargo pyo3-ffi 0.28.2 object/::{PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#, PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#};
3 use craterust-analyzer cargo pyo3-ffi 0.28.2 crate/::Py_ssize_trust-analyzer cargo pyo3-ffi 0.28.2 pyport/Py_ssize_t#;
4 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_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#, c_voidrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/c_void#};
5 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/;
6
7 pub type getterrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/getter# = unsafe extern "C" fn(slf: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#, closure: *mut c_voidrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/c_void#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#;
8 pub type setterrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/setter# =
9 unsafe extern "C" fn(slf: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#, value: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#, closure: *mut c_voidrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/c_void#) -> c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#;
10
11 /// Represents the [PyGetSetDef](https://docs.python.org/3/c-api/structures.html#c.PyGetSetDef)
12 /// structure.
13 ///
14 /// Note that CPython may leave fields uninitialized. You must ensure that
15 /// `name` != NULL before dereferencing or reading other fields.
16 #[repr(C)]
17 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
18 pub struct PyGetSetDefrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef# {
19 pub namerust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef#name.: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#,
20 pub getrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef#get.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<getterrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/getter#>,
21 pub setrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef#set.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<setterrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/setter#>,
22 pub docrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef#doc.: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#,
23 pub closurerust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef#closure.: *mut c_voidrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/c_void#,
24 }
25
26 impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for PyGetSetDefrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef# {
27 fn defaultrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/impl#[PyGetSetDef][Default]default().() -> PyGetSetDefrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef# {
28 PyGetSetDefrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef# {
29 namerust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef#name.: ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/::nullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/null().(),
30 getrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef#get.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
31 setrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef#set.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
32 docrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef#doc.: ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/::nullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/null().(),
33 closurerust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef#closure.: ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/::null_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/null_mut().(),
34 }
35 }
36 }
37
38 #[cfg_attr(windows, link(name = "pythonXY"))]
39 extern "C" {
40 #[cfg_attr(PyPy, link_name = "PyPyClassMethodDescr_Type")]
41 pub static mut PyClassMethodDescr_Typerust-analyzer cargo pyo3-ffi 0.28.2 PyClassMethodDescr_Type.: PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#;
42 #[cfg_attr(PyPy, link_name = "PyPyGetSetDescr_Type")]
43 pub static mut PyGetSetDescr_Typerust-analyzer cargo pyo3-ffi 0.28.2 PyGetSetDescr_Type.: PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#;
44 #[cfg_attr(PyPy, link_name = "PyPyMemberDescr_Type")]
45 pub static mut PyMemberDescr_Typerust-analyzer cargo pyo3-ffi 0.28.2 PyMemberDescr_Type.: PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#;
46 #[cfg_attr(PyPy, link_name = "PyPyMethodDescr_Type")]
47 pub static mut PyMethodDescr_Typerust-analyzer cargo pyo3-ffi 0.28.2 PyMethodDescr_Type.: PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#;
48 #[cfg_attr(PyPy, link_name = "PyPyWrapperDescr_Type")]
49 pub static mut PyWrapperDescr_Typerust-analyzer cargo pyo3-ffi 0.28.2 PyWrapperDescr_Type.: PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#;
50 #[cfg_attr(PyPy, link_name = "PyPyDictProxy_Type")]
51 pub static mut PyDictProxy_Typerust-analyzer cargo pyo3-ffi 0.28.2 PyDictProxy_Type.: PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#;
52 #[cfg_attr(PyPy, link_name = "PyPyProperty_Type")]
53 pub static mut PyProperty_Typerust-analyzer cargo pyo3-ffi 0.28.2 PyProperty_Type.: PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#;
54 }
55
56 extern "C" {
57 pub fn PyDescr_NewMethodrust-analyzer cargo pyo3-ffi 0.28.2 PyDescr_NewMethod().(arg1: *mut PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#, arg2: *mut PyMethodDefrust-analyzer cargo pyo3-ffi 0.28.2 methodobject/PyMethodDef#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#;
58 #[cfg_attr(PyPy, link_name = "PyPyDescr_NewClassMethod")]
59 pub fn PyDescr_NewClassMethodrust-analyzer cargo pyo3-ffi 0.28.2 PyDescr_NewClassMethod().(arg1: *mut PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#, arg2: *mut PyMethodDefrust-analyzer cargo pyo3-ffi 0.28.2 methodobject/PyMethodDef#)
60 -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#;
61 #[cfg_attr(PyPy, link_name = "PyPyDescr_NewMember")]
62 pub fn PyDescr_NewMemberrust-analyzer cargo pyo3-ffi 0.28.2 PyDescr_NewMember().(arg1: *mut PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#, arg2: *mut PyMemberDefrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#;
63 #[cfg_attr(PyPy, link_name = "PyPyDescr_NewGetSet")]
64 pub fn PyDescr_NewGetSetrust-analyzer cargo pyo3-ffi 0.28.2 PyDescr_NewGetSet().(arg1: *mut PyTypeObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyTypeObject#, arg2: *mut PyGetSetDefrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyGetSetDef#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#;
65
66 #[cfg_attr(PyPy, link_name = "PyPyDictProxy_New")]
67 pub fn PyDictProxy_Newrust-analyzer cargo pyo3-ffi 0.28.2 PyDictProxy_New().(arg1: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#;
68 pub fn PyWrapper_Newrust-analyzer cargo pyo3-ffi 0.28.2 PyWrapper_New().(arg1: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#, arg2: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#;
69 }
70
71 /// Represents the [PyMemberDef](https://docs.python.org/3/c-api/structures.html#c.PyMemberDef)
72 /// structure.
73 ///
74 /// Note that CPython may leave fields uninitialized. You must always ensure that
75 /// `name` != NULL before dereferencing or reading other fields.
76 #[repr(C)]
77 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
78 pub struct PyMemberDefrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef# {
79 pub namerust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef#name.: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#,
80 pub type_coderust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef#type_code.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#,
81 pub offsetrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef#offset.: Py_ssize_trust-analyzer cargo pyo3-ffi 0.28.2 pyport/Py_ssize_t#,
82 pub flagsrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef#flags.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#,
83 pub docrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef#doc.: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#,
84 }
85
86 impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for PyMemberDefrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef# {
87 fn defaultrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/impl#[PyMemberDef][Default]default().() -> PyMemberDefrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef# {
88 PyMemberDefrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef# {
89 namerust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef#name.: ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/::null_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/null_mut().(),
90 type_coderust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef#type_code.: 0,
91 offsetrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef#offset.: 0,
92 flagsrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef#flags.: 0,
93 docrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef#doc.: ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/::null_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/null_mut().(),
94 }
95 }
96 }
97
98 /* Types */
99 pub const Py_T_SHORTrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_SHORT.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 0;
100 pub const Py_T_INTrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_INT.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 1;
101 pub const Py_T_LONGrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_LONG.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 2;
102 pub const Py_T_FLOATrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_FLOAT.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 3;
103 pub const Py_T_DOUBLErust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_DOUBLE.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 4;
104 pub const Py_T_STRINGrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_STRING.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 5;
105 #[deprecated(note = "Use Py_T_OBJECT_EX instead")]
106 pub const _Py_T_OBJECTrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/_Py_T_OBJECT.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 6;
107 pub const Py_T_CHARrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_CHAR.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 7;
108 pub const Py_T_BYTErust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_BYTE.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 8;
109 pub const Py_T_UBYTErust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_UBYTE.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 9;
110 pub const Py_T_USHORTrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_USHORT.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 10;
111 pub const Py_T_UINTrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_UINT.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 11;
112 pub const Py_T_ULONGrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_ULONG.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 12;
113 pub const Py_T_STRING_INPLACErust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_STRING_INPLACE.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 13;
114 pub const Py_T_BOOLrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_BOOL.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 14;
115 pub const Py_T_OBJECT_EXrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_OBJECT_EX.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 16;
116 pub const Py_T_LONGLONGrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_LONGLONG.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 17;
117 pub const Py_T_ULONGLONGrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_ULONGLONG.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 18;
118 pub const Py_T_PYSSIZETrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_T_PYSSIZET.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 19;
119 #[deprecated(note = "Value is always none")]
120 pub const _Py_T_NONErust-analyzer cargo pyo3-ffi 0.28.2 descrobject/_Py_T_NONE.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 20;
121
122 /* Flags */
123 pub const Py_READONLYrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_READONLY.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 1;
124 #[cfg(Py_3_10)]
125 pub const Py_AUDIT_READ: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 2; // Added in 3.10, harmless no-op before that
126 #[deprecated]
127 pub const _Py_WRITE_RESTRICTEDrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/_Py_WRITE_RESTRICTED.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 4; // Deprecated, no-op. Do not reuse the value.
128 pub const Py_RELATIVE_OFFSETrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/Py_RELATIVE_OFFSET.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 8;
129
130 extern "C" {
131 pub fn PyMember_GetOnerust-analyzer cargo pyo3-ffi 0.28.2 PyMember_GetOne().(addr: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, l: *mut PyMemberDefrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#;
132 pub fn PyMember_SetOnerust-analyzer cargo pyo3-ffi 0.28.2 PyMember_SetOne().(addr: *mut c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, l: *mut PyMemberDefrust-analyzer cargo pyo3-ffi 0.28.2 descrobject/PyMemberDef#, value: *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#;
133 }