File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -996,7 +996,6 @@ pub enum BuildFlag {
996
996
Py_DEBUG ,
997
997
Py_REF_DEBUG ,
998
998
Py_TRACE_REFS ,
999
- Py_GIL_DISABLED ,
1000
999
COUNT_ALLOCS ,
1001
1000
Other ( String ) ,
1002
1001
}
@@ -1017,7 +1016,6 @@ impl FromStr for BuildFlag {
1017
1016
"Py_DEBUG" => Ok ( BuildFlag :: Py_DEBUG ) ,
1018
1017
"Py_REF_DEBUG" => Ok ( BuildFlag :: Py_REF_DEBUG ) ,
1019
1018
"Py_TRACE_REFS" => Ok ( BuildFlag :: Py_TRACE_REFS ) ,
1020
- "Py_GIL_DISABLED" => Ok ( BuildFlag :: Py_GIL_DISABLED ) ,
1021
1019
"COUNT_ALLOCS" => Ok ( BuildFlag :: COUNT_ALLOCS ) ,
1022
1020
other => Ok ( BuildFlag :: Other ( other. to_owned ( ) ) ) ,
1023
1021
}
@@ -1041,11 +1039,10 @@ impl FromStr for BuildFlag {
1041
1039
pub struct BuildFlags ( pub HashSet < BuildFlag > ) ;
1042
1040
1043
1041
impl BuildFlags {
1044
- const ALL : [ BuildFlag ; 5 ] = [
1042
+ const ALL : [ BuildFlag ; 4 ] = [
1045
1043
BuildFlag :: Py_DEBUG ,
1046
1044
BuildFlag :: Py_REF_DEBUG ,
1047
1045
BuildFlag :: Py_TRACE_REFS ,
1048
- BuildFlag :: Py_GIL_DISABLED ,
1049
1046
BuildFlag :: COUNT_ALLOCS ,
1050
1047
] ;
1051
1048
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ fn ensure_gil_enabled(interpreter_config: &InterpreterConfig) -> Result<()> {
125
125
let gil_enabled = interpreter_config
126
126
. build_flags
127
127
. 0
128
- . contains ( & BuildFlag :: Py_GIL_DISABLED )
128
+ . contains ( & BuildFlag :: Other ( " Py_GIL_DISABLED" . to_string ( ) ) )
129
129
. not ( ) ;
130
130
ensure ! (
131
131
gil_enabled || std:: env:: var( "UNSAFE_PYO3_BUILD_FREE_THREADED" ) . map_or( false , |os_str| os_str == "1" ) ,
You can’t perform that action at this time.
0 commit comments