]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46850: Move _PyEval_EvalFrameDefault() to internal C API (GH-32052)
authorVictor Stinner <vstinner@python.org>
Fri, 1 Apr 2022 08:17:57 +0000 (10:17 +0200)
committerGitHub <noreply@github.com>
Fri, 1 Apr 2022 08:17:57 +0000 (10:17 +0200)
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.

Doc/whatsnew/3.11.rst
Include/cpython/ceval.h
Include/internal/pycore_ceval.h
Misc/NEWS.d/next/C API/2022-03-22-16-48-02.bpo-46850.7M5dO7.rst [new file with mode: 0644]

index 16715c32502e403b190caf9f315b10affe4821c1..15f765dbe806ec133791cbb3afaedcc2dfdf848e 100644 (file)
@@ -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
 ----------
index 9d4eeafb427eb28b376bc7116b4d56dfff16b9d9..65aae2d669a52d27578fd7f0eb05af7c6d601967 100644 (file)
@@ -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);
 
index 45d26a37a34c695751b6d5af39300913d24ec063..b29b496ee3f58ee91c94498021d6727a7903101d 100644 (file)
@@ -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 (file)
index 0000000..1519ac7
--- /dev/null
@@ -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.