| 1 | use craterust-analyzer cargo pyo3-ffi 0.28.2 crate/::objectrust-analyzer cargo pyo3-ffi 0.28.2 object/::*; |
| 2 | #[cfg(not(any(PyPy, Py_LIMITED_API, Py_3_10)))] |
| 3 | use libcrust-analyzer cargo libc 0.2.182 crate/::FILErust-analyzer cargo libc 0.2.182 unix/FILE#; |
| 4 | #[cfg(any(Py_LIMITED_API, not(Py_3_10), PyPy, GraalPy))] |
| 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_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#; |
| 6 | 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#; |
| 7 | |
| 8 | extern "C" { |
| 9 | #[cfg(any(all(Py_LIMITED_API, not(PyPy)), GraalPy))] |
| 10 | pub fn Py_CompileStringrust-analyzer cargo pyo3-ffi 0.28.2 Py_CompileString().(string: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, p: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, s: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#; |
| 11 | |
| 12 | #[cfg_attr(PyPy, link_name = "PyPyErr_Print")] |
| 13 | pub fn PyErr_Printrust-analyzer cargo pyo3-ffi 0.28.2 PyErr_Print().(); |
| 14 | #[cfg_attr(PyPy, link_name = "PyPyErr_PrintEx")] |
| 15 | pub fn PyErr_PrintExrust-analyzer cargo pyo3-ffi 0.28.2 PyErr_PrintEx().(arg1: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#); |
| 16 | #[cfg_attr(PyPy, link_name = "PyPyErr_Display")] |
| 17 | pub fn PyErr_Displayrust-analyzer cargo pyo3-ffi 0.28.2 PyErr_Display().(arg1: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#, arg2: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#, arg3: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#); |
| 18 | |
| 19 | #[cfg(Py_3_12)] |
| 20 | pub fn PyErr_DisplayException(exc: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#); |
| 21 | } |
| 22 | |
| 23 | #[inline] |
| 24 | #[cfg(PyPy)] |
| 25 | pub unsafe fn Py_CompileString(string: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, p: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, s: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject# { |
| 26 | // PyPy's implementation of Py_CompileString always forwards to Py_CompileStringFlags; this |
| 27 | // is only available in the non-limited API and has a real definition for all versions in |
| 28 | // the cpython/ subdirectory. |
| 29 | #[cfg(Py_LIMITED_API)] |
| 30 | extern "C" { |
| 31 | #[link_name = "PyPy_CompileStringFlags"] |
| 32 | pub fn Py_CompileStringFlags( |
| 33 | string: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, |
| 34 | p: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, |
| 35 | s: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#, |
| 36 | f: *mut 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_voidrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/c_void#, // Actually *mut Py_CompilerFlags in the real definition |
| 37 | ) -> *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#; |
| 38 | } |
| 39 | #[cfg(not(Py_LIMITED_API))] |
| 40 | use craterust-analyzer cargo pyo3-ffi 0.28.2 crate/::Py_CompileStringFlags; |
| 41 | |
| 42 | Py_CompileStringFlags(string, p, s, 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/::null_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/null_mut().()) |
| 43 | } |
| 44 | |
| 45 | // skipped PyOS_InputHook |
| 46 | |
| 47 | pub const PYOS_STACK_MARGINrust-analyzer cargo pyo3-ffi 0.28.2 pythonrun/PYOS_STACK_MARGIN.: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int# = 2048; |
| 48 | |
| 49 | // skipped PyOS_CheckStack under Microsoft C |
| 50 | |
| 51 | #[cfg(not(any(PyPy, Py_LIMITED_API, Py_3_10)))] |
| 52 | opaque_structrust-analyzer cargo pyo3-ffi 0.28.2 opaque_struct!!(pub _mod); |
| 53 | |
| 54 | #[cfg(not(any(PyPy, Py_3_10)))] |
| 55 | opaque_structrust-analyzer cargo pyo3-ffi 0.28.2 opaque_struct!!(pub symtablerust-analyzer cargo pyo3-ffi 0.28.2 pythonrun/symtable#); |
| 56 | #[cfg(not(any(PyPy, Py_3_10)))] |
| 57 | opaque_structrust-analyzer cargo pyo3-ffi 0.28.2 opaque_struct!!(pub _noderust-analyzer cargo pyo3-ffi 0.28.2 pythonrun/_node#); |
| 58 | |
| 59 | #[cfg(not(any(PyPy, Py_LIMITED_API, Py_3_10)))] |
| 60 | #[cfg_attr(Py_3_9, deprecated(note = "Python 3.9"))] |
| 61 | #[inline] |
| 62 | pub unsafe fn PyParser_SimpleParseString(s: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, b: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#) -> *mut _noderust-analyzer cargo pyo3-ffi 0.28.2 pythonrun/_node# { |
| 63 | #[allow(deprecated)] |
| 64 | craterust-analyzer cargo pyo3-ffi 0.28.2 crate/::PyParser_SimpleParseStringFlags(s, b, 0) |
| 65 | } |
| 66 | |
| 67 | #[cfg(not(any(PyPy, Py_LIMITED_API, Py_3_10)))] |
| 68 | #[cfg_attr(Py_3_9, deprecated(note = "Python 3.9"))] |
| 69 | #[inline] |
| 70 | pub unsafe fn PyParser_SimpleParseFile(fp: *mut FILE, s: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, b: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#) -> *mut _noderust-analyzer cargo pyo3-ffi 0.28.2 pythonrun/_node# { |
| 71 | #[allow(deprecated)] |
| 72 | craterust-analyzer cargo pyo3-ffi 0.28.2 crate/::PyParser_SimpleParseFileFlags(fp, s, b, 0) |
| 73 | } |
| 74 | |
| 75 | extern "C" { |
| 76 | #[cfg(not(any(PyPy, Py_3_10)))] |
| 77 | pub fn Py_SymtableStringrust-analyzer cargo pyo3-ffi 0.28.2 Py_SymtableString().( |
| 78 | str: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, |
| 79 | filename: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, |
| 80 | start: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#, |
| 81 | ) -> *mut symtablerust-analyzer cargo pyo3-ffi 0.28.2 pythonrun/symtable#; |
| 82 | #[cfg(not(any(PyPy, Py_LIMITED_API, Py_3_10)))] |
| 83 | pub fn Py_SymtableStringObject( |
| 84 | str: *const c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, |
| 85 | filename: *mut PyObjectrust-analyzer cargo pyo3-ffi 0.28.2 object/PyObject#, |
| 86 | start: c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#, |
| 87 | ) -> *mut symtablerust-analyzer cargo pyo3-ffi 0.28.2 pythonrun/symtable#; |
| 88 | } |