diff options
author | Victor Stinner <vstinner@python.org> | 2020-04-28 14:32:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-28 14:32:48 (GMT) |
commit | 7c59d7c9860cdbaf4a9c26c9142aebd3259d046e (patch) | |
tree | 25d14f4febac1b124878b5875a936b47c6706771 /Include/ceval.h | |
parent | 5da352616fb8290e3c2c0245f553280824093c6a (diff) | |
download | cpython-7c59d7c9860cdbaf4a9c26c9142aebd3259d046e.zip cpython-7c59d7c9860cdbaf4a9c26c9142aebd3259d046e.tar.gz cpython-7c59d7c9860cdbaf4a9c26c9142aebd3259d046e.tar.bz2 |
bpo-40421: Add pyframe.h header file (GH-19755)
Add a new separated pyframe.h header file of the PyFrame public C
API: it is included by Python.h.
Add PyFrame_GetLineNumber() to the limited C API.
Replace "struct _frame" with "PyFrameObject" in header files.
PyFrameObject is now defined as struct _frame by pyframe.h which is
included early enough in Python.h.
Diffstat (limited to 'Include/ceval.h')
-rw-r--r-- | Include/ceval.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Include/ceval.h b/Include/ceval.h index a70c421..df52539 100644 --- a/Include/ceval.h +++ b/Include/ceval.h @@ -28,12 +28,10 @@ Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallFunction( Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallMethod( PyObject *obj, const char *name, const char *format, ...); -struct _frame; /* Avoid including frameobject.h */ - PyAPI_FUNC(PyObject *) PyEval_GetBuiltins(void); PyAPI_FUNC(PyObject *) PyEval_GetGlobals(void); PyAPI_FUNC(PyObject *) PyEval_GetLocals(void); -PyAPI_FUNC(struct _frame *) PyEval_GetFrame(void); +PyAPI_FUNC(PyFrameObject *) PyEval_GetFrame(void); PyAPI_FUNC(int) Py_AddPendingCall(int (*func)(void *), void *arg); PyAPI_FUNC(int) Py_MakePendingCalls(void); @@ -80,8 +78,8 @@ PyAPI_FUNC(void) Py_LeaveRecursiveCall(void); PyAPI_FUNC(const char *) PyEval_GetFuncName(PyObject *); PyAPI_FUNC(const char *) PyEval_GetFuncDesc(PyObject *); -PyAPI_FUNC(PyObject *) PyEval_EvalFrame(struct _frame *); -PyAPI_FUNC(PyObject *) PyEval_EvalFrameEx(struct _frame *f, int exc); +PyAPI_FUNC(PyObject *) PyEval_EvalFrame(PyFrameObject *); +PyAPI_FUNC(PyObject *) PyEval_EvalFrameEx(PyFrameObject *f, int exc); /* Interface for threads. |