File tree 5 files changed +25
-1
lines changed
5 files changed +25
-1
lines changed Original file line number Diff line number Diff line change
1
+ In Python 3.11 the ` _PyFrameEvalFunction ` receives a ` _PyInterpreterFrame ` opaque struct.
2
+
Original file line number Diff line number Diff line change @@ -5,7 +5,16 @@ use std::os::raw::c_int;
5
5
extern "C" {
6
6
// skipped non-limited _PyEval_CallTracing
7
7
8
+ #[ cfg( not( Py_3_11 ) ) ]
8
9
pub fn _PyEval_EvalFrameDefault ( arg1 : * mut crate :: PyFrameObject , exc : c_int ) -> * mut PyObject ;
10
+
11
+ #[ cfg( Py_3_11 ) ]
12
+ pub fn _PyEval_EvalFrameDefault (
13
+ tstate : * mut crate :: PyThreadState ,
14
+ frame : * mut crate :: _PyInterpreterFrame ,
15
+ exc : c_int ,
16
+ ) -> * mut crate :: PyObject ;
17
+
9
18
pub fn _PyEval_RequestCodeExtraIndex ( func : freefunc ) -> c_int ;
10
19
pub fn PyEval_SetProfile ( trace_func : Option < Py_tracefunc > , arg1 : * mut PyObject ) ;
11
20
pub fn PyEval_SetTrace ( trace_func : Option < Py_tracefunc > , arg1 : * mut PyObject ) ;
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ pub(crate) mod pystate;
31
31
pub ( crate ) mod pythonrun;
32
32
// skipped sysmodule.h
33
33
pub ( crate ) mod floatobject;
34
+ #[ cfg( not( PyPy ) ) ]
35
+ pub ( crate ) mod pyframe;
34
36
pub ( crate ) mod tupleobject;
35
37
pub ( crate ) mod unicodeobject;
36
38
pub ( crate ) mod weakrefobject;
@@ -58,6 +60,8 @@ pub use self::object::*;
58
60
pub use self :: objimpl:: * ;
59
61
pub use self :: pydebug:: * ;
60
62
pub use self :: pyerrors:: * ;
63
+ #[ cfg( not( PyPy ) ) ]
64
+ pub use self :: pyframe:: * ;
61
65
#[ cfg( all( Py_3_8 , not( PyPy ) ) ) ]
62
66
pub use self :: pylifecycle:: * ;
63
67
pub use self :: pymem:: * ;
Original file line number Diff line number Diff line change
1
+ #[ cfg( Py_3_11 ) ]
2
+ opaque_struct ! ( _PyInterpreterFrame) ;
Original file line number Diff line number Diff line change @@ -69,13 +69,20 @@ extern "C" {
69
69
pub fn PyThreadState_DeleteCurrent ( ) ;
70
70
}
71
71
72
- #[ cfg( Py_3_9 ) ]
72
+ #[ cfg( all ( Py_3_9 , not ( Py_3_11 ) ) ) ]
73
73
pub type _PyFrameEvalFunction = extern "C" fn (
74
74
* mut crate :: PyThreadState ,
75
75
* mut crate :: PyFrameObject ,
76
76
c_int ,
77
77
) -> * mut crate :: object:: PyObject ;
78
78
79
+ #[ cfg( Py_3_11 ) ]
80
+ pub type _PyFrameEvalFunction = extern "C" fn (
81
+ * mut crate :: PyThreadState ,
82
+ * mut crate :: _PyInterpreterFrame ,
83
+ c_int ,
84
+ ) -> * mut crate :: object:: PyObject ;
85
+
79
86
#[ cfg( Py_3_9 ) ]
80
87
extern "C" {
81
88
/// Get the frame evaluation function.
You can’t perform that action at this time.
0 commit comments