File tree 7 files changed +15
-42
lines changed
7 files changed +15
-42
lines changed Original file line number Diff line number Diff line change @@ -1228,25 +1228,18 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
1228
1228
1229
1229
.. versionadded :: 3.8
1230
1230
1231
- .. c :type :: PyObject* (*_PyFrameEvalFunction)(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
1232
-
1233
- Internal C API.
1231
+ .. c :type :: PyObject* (*_PyFrameEvalFunction)(PyThreadState *tstate, PyFrameObject *frame, int throwflag)
1234
1232
1235
1233
Type of a frame evaluation function.
1236
1234
1237
1235
The *throwflag * parameter is used by the ``throw() `` method of generators:
1238
1236
if non-zero, handle the current exception.
1239
1237
1240
- .. versionchanged :: 3.11
1241
- The second parameter type becomes ``_PyInterpreterFrame ``.
1242
-
1243
1238
.. versionchanged :: 3.9
1244
1239
The function now takes a *tstate * parameter.
1245
1240
1246
1241
.. c :function :: _PyFrameEvalFunction _PyInterpreterState_GetEvalFrameFunc (PyInterpreterState *interp)
1247
1242
1248
- Internal C API.
1249
-
1250
1243
Get the frame evaluation function.
1251
1244
1252
1245
See the :pep: `523 ` "Adding a frame evaluation API to CPython".
@@ -1255,8 +1248,6 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
1255
1248
1256
1249
.. c :function :: void _PyInterpreterState_SetEvalFrameFunc (PyInterpreterState *interp, _PyFrameEvalFunction eval_frame)
1257
1250
1258
- Internal C API.
1259
-
1260
1251
Set the frame evaluation function.
1261
1252
1262
1253
See the :pep: `523 ` "Adding a frame evaluation API to CPython".
Original file line number Diff line number Diff line change @@ -1338,17 +1338,6 @@ Porting to Python 3.11
1338
1338
* Distributors are encouraged to build Python with the optimized Blake2
1339
1339
library `libb2 `_.
1340
1340
1341
- * Move the private undocumented ``_PyEval_EvalFrameDefault() `` function to the
1342
- internal C API. The function now uses the ``_PyInterpreterFrame `` type which
1343
- is part of the internal C API.
1344
- (Contributed by Victor Stinner in :issue: `46850 `.)
1345
-
1346
- * Move the private ``_PyFrameEvalFunction `` type, and private
1347
- ``_PyInterpreterState_GetEvalFrameFunc() `` and
1348
- ``_PyInterpreterState_SetEvalFrameFunc() `` functions to the internal C API.
1349
- The ``_PyFrameEvalFunction `` callback function type now uses the
1350
- ``_PyInterpreterFrame `` type which is part of the internal C API.
1351
- (Contributed by Victor Stinner in :issue: `46850 `.)
1352
1341
1353
1342
Deprecated
1354
1343
----------
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ PyAPI_FUNC(PyObject *) _PyEval_GetBuiltinId(_Py_Identifier *);
15
15
flag was set, else return 0. */
16
16
PyAPI_FUNC (int ) PyEval_MergeCompilerFlags (PyCompilerFlags * cf );
17
17
18
+ PyAPI_FUNC (PyObject * ) _PyEval_EvalFrameDefault (PyThreadState * tstate , struct _PyInterpreterFrame * f , int exc );
19
+
18
20
PyAPI_FUNC (void ) _PyEval_SetSwitchInterval (unsigned long microseconds );
19
21
PyAPI_FUNC (unsigned long ) _PyEval_GetSwitchInterval (void );
20
22
Original file line number Diff line number Diff line change @@ -259,6 +259,16 @@ PyAPI_FUNC(PyThreadState *) PyInterpreterState_ThreadHead(PyInterpreterState *);
259
259
PyAPI_FUNC (PyThreadState * ) PyThreadState_Next (PyThreadState * );
260
260
PyAPI_FUNC (void ) PyThreadState_DeleteCurrent (void );
261
261
262
+ /* Frame evaluation API */
263
+
264
+ typedef PyObject * (* _PyFrameEvalFunction )(PyThreadState * tstate , struct _PyInterpreterFrame * , int );
265
+
266
+ PyAPI_FUNC (_PyFrameEvalFunction ) _PyInterpreterState_GetEvalFrameFunc (
267
+ PyInterpreterState * interp );
268
+ PyAPI_FUNC (void ) _PyInterpreterState_SetEvalFrameFunc (
269
+ PyInterpreterState * interp ,
270
+ _PyFrameEvalFunction eval_frame );
271
+
262
272
PyAPI_FUNC (const PyConfig * ) _PyInterpreterState_GetConfig (PyInterpreterState * interp );
263
273
264
274
/* Get a copy of the current interpreter configuration.
Original file line number Diff line number Diff line change @@ -59,11 +59,6 @@ extern PyObject* _PyEval_BuiltinsFromGlobals(
59
59
PyObject * globals );
60
60
61
61
62
- PyAPI_FUNC (PyObject * ) _PyEval_EvalFrameDefault (
63
- PyThreadState * tstate ,
64
- struct _PyInterpreterFrame * frame ,
65
- int throwflag );
66
-
67
62
static inline PyObject *
68
63
_PyEval_EvalFrame (PyThreadState * tstate , struct _PyInterpreterFrame * frame , int throwflag )
69
64
{
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ extern "C" {
17
17
#include "pycore_dict.h" // struct _Py_dict_state
18
18
#include "pycore_exceptions.h" // struct _Py_exc_state
19
19
#include "pycore_floatobject.h" // struct _Py_float_state
20
- #include "pycore_gc.h" // struct _gc_runtime_state
21
20
#include "pycore_genobject.h" // struct _Py_async_gen_state
22
21
#include "pycore_gil.h" // struct _gil_runtime_state
22
+ #include "pycore_gc.h" // struct _gc_runtime_state
23
23
#include "pycore_list.h" // struct _Py_list_state
24
24
#include "pycore_tuple.h" // struct _Py_tuple_state
25
25
#include "pycore_typeobject.h" // struct type_cache
@@ -71,20 +71,6 @@ struct atexit_state {
71
71
};
72
72
73
73
74
- /* Frame evaluation API (PEP 523) */
75
-
76
- typedef PyObject * (* _PyFrameEvalFunction ) (
77
- PyThreadState * tstate ,
78
- struct _PyInterpreterFrame * frame ,
79
- int throwflag );
80
-
81
- PyAPI_FUNC (_PyFrameEvalFunction ) _PyInterpreterState_GetEvalFrameFunc (
82
- PyInterpreterState * interp );
83
- PyAPI_FUNC (void ) _PyInterpreterState_SetEvalFrameFunc (
84
- PyInterpreterState * interp ,
85
- _PyFrameEvalFunction eval_frame );
86
-
87
-
88
74
/* interpreter state */
89
75
90
76
/* PyInterpreterState holds the global state for one of the runtime's
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ extern "C" {
8
8
# error "this header requires Py_BUILD_CORE define"
9
9
#endif
10
10
11
- #include "pycore_runtime.h" // _PyRuntime
11
+ #include "pycore_runtime.h" /* PyRuntimeState */
12
12
13
13
14
14
/* Check if the current thread is the main thread.
You can’t perform that action at this time.
0 commit comments