From 4931b00cbc8491f4562b76f13266ec127a017529 Mon Sep 17 00:00:00 2001 From: Erle Carrara Date: Mon, 9 Oct 2023 19:58:29 -0300 Subject: [PATCH] fix build cfg: _PyInterpreterFrame is not available on PyPy --- pyo3-ffi/src/cpython/mod.rs | 1 + pyo3-ffi/src/cpython/pyframe.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyo3-ffi/src/cpython/mod.rs b/pyo3-ffi/src/cpython/mod.rs index 9b0874e3102..c6d08aad4ee 100644 --- a/pyo3-ffi/src/cpython/mod.rs +++ b/pyo3-ffi/src/cpython/mod.rs @@ -31,6 +31,7 @@ pub(crate) mod pystate; pub(crate) mod pythonrun; // skipped sysmodule.h pub(crate) mod floatobject; +#[cfg(not(PyPy))] pub(crate) mod pyframe; pub(crate) mod tupleobject; pub(crate) mod unicodeobject; diff --git a/pyo3-ffi/src/cpython/pyframe.rs b/pyo3-ffi/src/cpython/pyframe.rs index 32c14129a54..d0cfa0a2c6d 100644 --- a/pyo3-ffi/src/cpython/pyframe.rs +++ b/pyo3-ffi/src/cpython/pyframe.rs @@ -1,2 +1,2 @@ -#[cfg(any(PyPy, Py_3_11))] +#[cfg(Py_3_11)] opaque_struct!(_PyInterpreterFrame);