| 24 | #[inline] |
| 25 | #[cfg(PyPy)] |
| 26 | pub unsafe fn Py_CompileString(string: *const c_char, p: *const c_char, s: c_int) -> *mut PyObject { |
| 27 | // PyPy's implementation of Py_CompileString always forwards to Py_CompileStringFlags; this |
| 28 | // is only available in the non-limited API and has a real definition for all versions in |
| 29 | // the cpython/ subdirectory. |
| 30 | #[cfg(Py_LIMITED_API)] |
| 31 | extern_libpython! { |
| 32 | #[link_name = "PyPy_CompileStringFlags"] |
| 33 | pub fn Py_CompileStringFlags( |
| 34 | string: *const c_char, |
| 35 | p: *const c_char, |
| 36 | s: c_int, |
| 37 | f: *mut core::ffi::c_void, // Actually *mut Py_CompilerFlags in the real definition |
| 38 | ) -> *mut PyObject; |
| 39 | } |
| 40 | #[cfg(not(Py_LIMITED_API))] |
| 41 | use crate::Py_CompileStringFlags; |
| 42 | |
| 43 | Py_CompileStringFlags(string, p, s, core::ptr::null_mut()) |
| 44 | } |
| 45 | |
| 46 | // skipped PyOS_InputHook |
| 47 | |