Skip to content

Commit 2a9f29f

Browse files
committed
add missing cfgs
1 parent ae613b3 commit 2a9f29f

4 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/interpreter_lifecycle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub(crate) fn initialize() {
3232
///
3333
/// # Safety
3434
/// `config` must point to a valid [`PyInitConfig`](crate::ffi::PyInitConfig) object.
35-
#[cfg(not(any(PyPy, GraalPy)))]
35+
#[cfg(all(Py_3_14, not(any(PyPy, GraalPy))))]
3636
pub(crate) unsafe fn initialize_from_config(config: *mut ffi::PyInitConfig) -> Option<c_int> {
3737
let mut result = None;
3838
START.call_once_force(|_| unsafe {

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ pub mod marshal;
437437
#[macro_use]
438438
pub mod sync;
439439
pub(crate) mod byteswriter;
440-
#[cfg(all(Py_3_14, not(any(PyPy, GraalPy))))]
440+
#[cfg(all(Py_3_14, not(any(PyPy, GraalPy, RustPython, Py_LIMITED_API))))]
441441
pub mod init_config;
442442
pub mod panic;
443443
pub mod pybacked;

tests/test_init_config_initializes_interpreter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![cfg(all(Py_3_14, not(any(PyPy, GraalPy, RustPython, Py_LIMITED_API))))]
12
#![allow(clippy::undocumented_unsafe_blocks, reason = "tests")]
23

34
use pyo3::init_config::InitConfig;

tests/tests_init_config_panics_if_already_initialized.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg(all(Py_3_14, not(any(PyPy, GraalPy, RustPython, Py_LIMITED_API))))]
2+
13
use pyo3::init_config::InitConfig;
24
use pyo3::prelude::Python;
35

0 commit comments

Comments
 (0)