summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/whatsnew/3.11.rst5
-rw-r--r--Include/cpython/ceval.h2
-rw-r--r--Include/internal/pycore_ceval.h5
-rw-r--r--Misc/NEWS.d/next/C API/2022-03-22-16-48-02.bpo-46850.7M5dO7.rst3
4 files changed, 13 insertions, 2 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 16715c3..15f765d 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -1097,6 +1097,11 @@ Porting to Python 3.11
* Distributors are encouraged to build Python with the optimized Blake2
library `libb2`_.
+* 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.
+ (Contributed by Victor Stinner in :issue:`46850`.)
+
Deprecated
----------
diff --git a/Include/cpython/ceval.h b/Include/cpython/ceval.h
index 9d4eeaf..65aae2d 100644
--- a/Include/cpython/ceval.h
+++ b/Include/cpython/ceval.h
@@ -15,8 +15,6 @@ PyAPI_FUNC(PyObject *) _PyEval_GetBuiltinId(_Py_Identifier *);
flag was set, else return 0. */
PyAPI_FUNC(int) PyEval_MergeCompilerFlags(PyCompilerFlags *cf);
-PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct _PyInterpreterFrame *f, int exc);
-
PyAPI_FUNC(void) _PyEval_SetSwitchInterval(unsigned long microseconds);
PyAPI_FUNC(unsigned long) _PyEval_GetSwitchInterval(void);
diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h
index 45d26a3..b29b496 100644
--- a/Include/internal/pycore_ceval.h
+++ b/Include/internal/pycore_ceval.h
@@ -59,6 +59,11 @@ extern PyObject* _PyEval_BuiltinsFromGlobals(
PyObject *globals);
+PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(
+ PyThreadState *tstate,
+ struct _PyInterpreterFrame *frame,
+ int throwflag);
+
static inline PyObject*
_PyEval_EvalFrame(PyThreadState *tstate, struct _PyInterpreterFrame *frame, int throwflag)
{
diff --git a/Misc/NEWS.d/next/C API/2022-03-22-16-48-02.bpo-46850.7M5dO7.rst b/Misc/NEWS.d/next/C API/2022-03-22-16-48-02.bpo-46850.7M5dO7.rst
new file mode 100644
index 0000000..1519ac7
--- /dev/null
+++ b/Misc/NEWS.d/next/C API/2022-03-22-16-48-02.bpo-46850.7M5dO7.rst
@@ -0,0 +1,3 @@
+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. Patch by Victor Stinner.