_PyOpcache does not exist on Python 3.11

NB: the definition of PyCodeObject is still quite wrong. This is the minimal change to get pyo3-ffi-check to compile at all!
This commit is contained in:
Alex Gaynor 2022-06-04 10:46:05 -04:00
parent b2c4c0f48c
commit 12d38dbcf8
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ use std::os::raw::{c_char, c_int, c_void};
// skipped _Py_OPCODE
// skipped _Py_OPARG
#[cfg(all(Py_3_8, not(PyPy)))]
#[cfg(all(Py_3_8, not(PyPy), not(Py_3_11)))]
opaque_struct!(_PyOpcache);
#[cfg(not(PyPy))]
@ -39,7 +39,7 @@ pub struct PyCodeObject {
pub co_extra: *mut c_void,
#[cfg(Py_3_8)]
pub co_opcache_map: *mut c_uchar,
#[cfg(Py_3_8)]
#[cfg(all(Py_3_8, not(Py_3_11)))]
pub co_opcache: *mut _PyOpcache,
#[cfg(Py_3_8)]
pub co_opcache_flag: c_int,