Skip to content

Commit 6317570

Browse files
committed
remove BuildFlag member to avoid breaking change in patch
1 parent 7fed7c3 commit 6317570

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

pyo3-build-config/src/impl_.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,6 @@ pub enum BuildFlag {
996996
Py_DEBUG,
997997
Py_REF_DEBUG,
998998
Py_TRACE_REFS,
999-
Py_GIL_DISABLED,
1000999
COUNT_ALLOCS,
10011000
Other(String),
10021001
}
@@ -1017,7 +1016,6 @@ impl FromStr for BuildFlag {
10171016
"Py_DEBUG" => Ok(BuildFlag::Py_DEBUG),
10181017
"Py_REF_DEBUG" => Ok(BuildFlag::Py_REF_DEBUG),
10191018
"Py_TRACE_REFS" => Ok(BuildFlag::Py_TRACE_REFS),
1020-
"Py_GIL_DISABLED" => Ok(BuildFlag::Py_GIL_DISABLED),
10211019
"COUNT_ALLOCS" => Ok(BuildFlag::COUNT_ALLOCS),
10221020
other => Ok(BuildFlag::Other(other.to_owned())),
10231021
}
@@ -1041,11 +1039,10 @@ impl FromStr for BuildFlag {
10411039
pub struct BuildFlags(pub HashSet<BuildFlag>);
10421040

10431041
impl BuildFlags {
1044-
const ALL: [BuildFlag; 5] = [
1042+
const ALL: [BuildFlag; 4] = [
10451043
BuildFlag::Py_DEBUG,
10461044
BuildFlag::Py_REF_DEBUG,
10471045
BuildFlag::Py_TRACE_REFS,
1048-
BuildFlag::Py_GIL_DISABLED,
10491046
BuildFlag::COUNT_ALLOCS,
10501047
];
10511048

pyo3-ffi/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ fn ensure_gil_enabled(interpreter_config: &InterpreterConfig) -> Result<()> {
125125
let gil_enabled = interpreter_config
126126
.build_flags
127127
.0
128-
.contains(&BuildFlag::Py_GIL_DISABLED)
128+
.contains(&BuildFlag::Other("Py_GIL_DISABLED".to_string()))
129129
.not();
130130
ensure!(
131131
gil_enabled || std::env::var("UNSAFE_PYO3_BUILD_FREE_THREADED").map_or(false, |os_str| os_str == "1"),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy