1- #[ cfg( not( PyPy ) ) ]
21use crate :: PyThreadState ;
32use crate :: { PyFrameObject , PyInterpreterState , PyObject } ;
43use std:: ffi:: c_int;
54
6- // skipped _PyInterpreterState_RequiresIDRef
7- // skipped _PyInterpreterState_RequireIDRef
8-
9- // skipped _PyInterpreterState_GetMainModule
5+ // skipped private _PyInterpreterState_RequiresIDRef
6+ // skipped private _PyInterpreterState_RequireIDRef
107
118pub type Py_tracefunc = unsafe extern "C" fn (
129 obj : * mut PyObject ,
@@ -24,11 +21,14 @@ pub const PyTrace_C_EXCEPTION: c_int = 5;
2421pub const PyTrace_C_RETURN : c_int = 6 ;
2522pub const PyTrace_OPCODE : c_int = 7 ;
2623
27- // skipped PyTraceInfo
28- // skipped CFrame
24+ // skipped private _Py_MAX_SCRIPT_PATH_SIZE
25+ // skipped private _PyRemoteDebuggerSupport
2926
3027/// Private structure used inline in `PyGenObject`
31- #[ cfg( not( PyPy ) ) ]
28+ ///
29+ /// `PyGenObject` was made opaque in Python 3.14, so we don't bother defining this
30+ /// structure for that version and later.
31+ #[ cfg( not( any( PyPy , Py_3_14 ) ) ) ]
3232#[ repr( C ) ]
3333#[ derive( Clone , Copy ) ]
3434pub ( crate ) struct _PyErr_StackItem {
@@ -40,20 +40,30 @@ pub(crate) struct _PyErr_StackItem {
4040 previous_item : * mut _PyErr_StackItem ,
4141}
4242
43- // skipped _PyStackChunk
44- // skipped _ts (aka PyThreadState)
43+ // skipped private _PyStackChunk
44+
45+ // skipped private _PY_DATA_STACK_CHUNK_SIZE
46+ // skipped private _ts (aka PyThreadState)
4547
4648extern "C" {
47- // skipped _PyThreadState_Prealloc
48- // skipped _PyThreadState_UncheckedGet
49- // skipped _PyThreadState_GetDict
49+ #[ cfg( Py_3_13 ) ]
50+ pub fn PyThreadState_GetUnchecked ( ) -> * mut PyThreadState ;
51+
52+ #[ cfg( not( Py_3_13 ) ) ]
53+ pub ( crate ) fn _PyThreadState_UncheckedGet ( ) -> * mut PyThreadState ;
54+
55+ #[ cfg( Py_3_11 ) ]
56+ pub fn PyThreadState_EnterTracing ( state : * mut PyThreadState ) ;
57+ #[ cfg( Py_3_11 ) ]
58+ pub fn PyThreadState_LeaveTracing ( state : * mut PyThreadState ) ;
5059
5160 #[ cfg_attr( PyPy , link_name = "PyPyGILState_Check" ) ]
5261 pub fn PyGILState_Check ( ) -> c_int ;
5362
54- // skipped _PyGILState_GetInterpreterStateUnsafe
55- // skipped _PyThread_CurrentFrames
56- // skipped _PyThread_CurrentExceptions
63+ // skipped private _PyThread_CurrentFrames
64+
65+ // skipped PyUnstable_ThreadState_SetStackProtection
66+ // skipped PyUnstable_ThreadState_ResetStackProtection
5767
5868 #[ cfg( not( PyPy ) ) ]
5969 pub fn PyInterpreterState_Main ( ) -> * mut PyInterpreterState ;
@@ -70,44 +80,6 @@ extern "C" {
7080 pub fn PyThreadState_DeleteCurrent ( ) ;
7181}
7282
73- #[ cfg( all( Py_3_9 , not( any( Py_3_11 , PyPy ) ) ) ) ]
74- pub type _PyFrameEvalFunction = extern "C" fn (
75- * mut crate :: PyThreadState ,
76- * mut crate :: PyFrameObject ,
77- c_int ,
78- ) -> * mut crate :: object:: PyObject ;
79-
80- #[ cfg( all( Py_3_11 , not( PyPy ) ) ) ]
81- pub type _PyFrameEvalFunction = extern "C" fn (
82- * mut crate :: PyThreadState ,
83- * mut crate :: _PyInterpreterFrame ,
84- c_int ,
85- ) -> * mut crate :: object:: PyObject ;
86-
87- #[ cfg( all( Py_3_9 , not( PyPy ) ) ) ]
88- extern "C" {
89- /// Get the frame evaluation function.
90- pub fn _PyInterpreterState_GetEvalFrameFunc (
91- interp : * mut PyInterpreterState ,
92- ) -> _PyFrameEvalFunction ;
93-
94- ///Set the frame evaluation function.
95- pub fn _PyInterpreterState_SetEvalFrameFunc (
96- interp : * mut PyInterpreterState ,
97- eval_frame : _PyFrameEvalFunction ,
98- ) ;
99- }
100-
101- // skipped _PyInterpreterState_GetConfig
102- // skipped _PyInterpreterState_GetConfigCopy
103- // skipped _PyInterpreterState_SetConfig
104- // skipped _Py_GetConfig
105-
106- // skipped _PyCrossInterpreterData
107- // skipped _PyObject_GetCrossInterpreterData
108- // skipped _PyCrossInterpreterData_NewObject
109- // skipped _PyCrossInterpreterData_Release
110- // skipped _PyObject_CheckCrossInterpreterData
111- // skipped crossinterpdatafunc
112- // skipped _PyCrossInterpreterData_RegisterClass
113- // skipped _PyCrossInterpreterData_Lookup
83+ // skipped private _PyFrameEvalFunction
84+ // skipped private _PyInterpreterState_GetEvalFrameFunc
85+ // skipped private _PyInterpreterState_SetEvalFrameFunc
0 commit comments