Skip to content

Commit b9a5522

Browse files
authored
bpo-46850: Move _PyEval_EvalFrameDefault() to internal C API (GH-32052)
Move the private undocumented _PyEval_EvalFrameDefault() function to the internal C API. The function now uses the _PyInterpreterFrame type which is part of the internal C API.
1 parent d4bb38f commit b9a5522

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

Doc/whatsnew/3.11.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,11 @@ Porting to Python 3.11
10971097
* Distributors are encouraged to build Python with the optimized Blake2
10981098
library `libb2`_.
10991099

1100+
* Move the private undocumented ``_PyEval_EvalFrameDefault()`` function to the
1101+
internal C API. The function now uses the ``_PyInterpreterFrame`` type which
1102+
is part of the internal C API.
1103+
(Contributed by Victor Stinner in :issue:`46850`.)
1104+
11001105

11011106
Deprecated
11021107
----------

Include/cpython/ceval.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ PyAPI_FUNC(PyObject *) _PyEval_GetBuiltinId(_Py_Identifier *);
1515
flag was set, else return 0. */
1616
PyAPI_FUNC(int) PyEval_MergeCompilerFlags(PyCompilerFlags *cf);
1717

18-
PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct _PyInterpreterFrame *f, int exc);
19-
2018
PyAPI_FUNC(void) _PyEval_SetSwitchInterval(unsigned long microseconds);
2119
PyAPI_FUNC(unsigned long) _PyEval_GetSwitchInterval(void);
2220

Include/internal/pycore_ceval.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ extern PyObject* _PyEval_BuiltinsFromGlobals(
5959
PyObject *globals);
6060

6161

62+
PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(
63+
PyThreadState *tstate,
64+
struct _PyInterpreterFrame *frame,
65+
int throwflag);
66+
6267
static inline PyObject*
6368
_PyEval_EvalFrame(PyThreadState *tstate, struct _PyInterpreterFrame *frame, int throwflag)
6469
{
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Move the private undocumented ``_PyEval_EvalFrameDefault()`` function to the
2+
internal C API. The function now uses the ``_PyInterpreterFrame`` type which is
3+
part of the internal C API. Patch by Victor Stinner.

0 commit comments

Comments
 (0)