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.
This commit is contained in:
Victor Stinner 2022-04-01 10:17:57 +02:00 committed by GitHub
parent d4bb38f82b
commit b9a5522dd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 2 deletions

View 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
----------

View 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);

View 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)
{

View File

@ -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.