1- use std:: ffi:: { c_char, c_int} ;
1+ use std:: ffi:: c_char;
2+ #[ cfg( all( not( Py_LIMITED_API ) , not( Py_3_11 ) ) ) ]
3+ use std:: ffi:: c_int;
24
3- #[ cfg( not( Py_LIMITED_API ) ) ]
5+ #[ cfg( all ( not( Py_LIMITED_API ) , not ( Py_3_11 ) ) ) ]
46#[ cfg_attr( windows, link( name = "pythonXY" ) ) ]
57extern "C" {
6- #[ deprecated( note = "Python 3.12" ) ]
7- #[ cfg_attr( PyPy , link_name = "PyPy_DebugFlag" ) ]
8- pub static mut Py_DebugFlag : c_int ;
9- #[ deprecated( note = "Python 3.12" ) ]
10- #[ cfg_attr( PyPy , link_name = "PyPy_VerboseFlag" ) ]
11- pub static mut Py_VerboseFlag : c_int ;
12- #[ deprecated( note = "Python 3.12" ) ]
13- pub static mut Py_QuietFlag : c_int ;
14- #[ deprecated( note = "Python 3.12" ) ]
15- #[ cfg_attr( PyPy , link_name = "PyPy_InteractiveFlag" ) ]
16- pub static mut Py_InteractiveFlag : c_int ;
17- #[ deprecated( note = "Python 3.12" ) ]
18- #[ cfg_attr( PyPy , link_name = "PyPy_InspectFlag" ) ]
19- pub static mut Py_InspectFlag : c_int ;
20- #[ deprecated( note = "Python 3.12" ) ]
21- #[ cfg_attr( PyPy , link_name = "PyPy_OptimizeFlag" ) ]
22- pub static mut Py_OptimizeFlag : c_int ;
23- #[ deprecated( note = "Python 3.12" ) ]
24- #[ cfg_attr( PyPy , link_name = "PyPy_NoSiteFlag" ) ]
25- pub static mut Py_NoSiteFlag : c_int ;
26- #[ deprecated( note = "Python 3.12" ) ]
27- #[ cfg_attr( PyPy , link_name = "PyPy_BytesWarningFlag" ) ]
28- pub static mut Py_BytesWarningFlag : c_int ;
29- #[ deprecated( note = "Python 3.12" ) ]
30- #[ cfg_attr( PyPy , link_name = "PyPy_UseClassExceptionsFlag" ) ]
31- pub static mut Py_UseClassExceptionsFlag : c_int ;
32- #[ deprecated( note = "Python 3.12" ) ]
33- #[ cfg_attr( PyPy , link_name = "PyPy_FrozenFlag" ) ]
34- pub static mut Py_FrozenFlag : c_int ;
35- #[ deprecated( note = "Python 3.12" ) ]
368 #[ cfg_attr( PyPy , link_name = "PyPy_IgnoreEnvironmentFlag" ) ]
379 pub static mut Py_IgnoreEnvironmentFlag : c_int ;
38- #[ deprecated( note = "Python 3.12" ) ]
39- #[ cfg_attr( PyPy , link_name = "PyPy_DontWriteBytecodeFlag" ) ]
40- pub static mut Py_DontWriteBytecodeFlag : c_int ;
41- #[ deprecated( note = "Python 3.12" ) ]
42- #[ cfg_attr( PyPy , link_name = "PyPy_NoUserSiteDirectory" ) ]
43- pub static mut Py_NoUserSiteDirectory : c_int ;
44- #[ deprecated( note = "Python 3.12" ) ]
45- pub static mut Py_UnbufferedStdioFlag : c_int ;
46- #[ cfg_attr( PyPy , link_name = "PyPy_HashRandomizationFlag" ) ]
47- pub static mut Py_HashRandomizationFlag : c_int ;
48- #[ deprecated( note = "Python 3.12" ) ]
49- pub static mut Py_IsolatedFlag : c_int ;
50- #[ cfg( windows) ]
51- #[ deprecated( note = "Python 3.12" ) ]
52- pub static mut Py_LegacyWindowsFSEncodingFlag : c_int ;
53- #[ cfg( windows) ]
54- #[ deprecated( note = "Python 3.12" ) ]
55- pub static mut Py_LegacyWindowsStdioFlag : c_int ;
5610}
5711
5812extern "C" {
@@ -63,7 +17,6 @@ extern "C" {
6317#[ cfg( not( Py_3_11 ) ) ]
6418#[ inline( always) ]
6519pub unsafe fn Py_GETENV ( name : * const c_char ) -> * mut c_char {
66- #[ allow( deprecated) ]
6720 if Py_IgnoreEnvironmentFlag != 0 {
6821 std:: ptr:: null_mut ( )
6922 } else {
0 commit comments