summaryrefslogtreecommitdiffstats
path: root/Include/internal
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-28 14:32:48 (GMT)
committerGitHub <noreply@github.com>2020-04-28 14:32:48 (GMT)
commit7c59d7c9860cdbaf4a9c26c9142aebd3259d046e (patch)
tree25d14f4febac1b124878b5875a936b47c6706771 /Include/internal
parent5da352616fb8290e3c2c0245f553280824093c6a (diff)
downloadcpython-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/internal')
-rw-r--r--Include/internal/pycore_ceval.h3
-rw-r--r--Include/internal/pycore_traceback.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h
index 050dd59..2df796d 100644
--- a/Include/internal/pycore_ceval.h
+++ b/Include/internal/pycore_ceval.h
@@ -11,7 +11,6 @@ extern "C" {
/* Forward declarations */
struct pyruntimestate;
struct _ceval_runtime_state;
-struct _frame;
#include "pycore_interp.h" /* PyInterpreterState.eval_frame */
@@ -36,7 +35,7 @@ PyAPI_FUNC(void) _PyEval_SetCoroutineOriginTrackingDepth(
void _PyEval_Fini(void);
static inline PyObject*
-_PyEval_EvalFrame(PyThreadState *tstate, struct _frame *f, int throwflag)
+_PyEval_EvalFrame(PyThreadState *tstate, PyFrameObject *f, int throwflag)
{
return tstate->interp->eval_frame(tstate, f, throwflag);
}
diff --git a/Include/internal/pycore_traceback.h b/Include/internal/pycore_traceback.h
index 99443d7..1f09241 100644
--- a/Include/internal/pycore_traceback.h
+++ b/Include/internal/pycore_traceback.h
@@ -89,7 +89,7 @@ PyAPI_FUNC(void) _Py_DumpHexadecimal(
PyAPI_FUNC(PyObject*) _PyTraceBack_FromFrame(
PyObject *tb_next,
- struct _frame *frame);
+ PyFrameObject *frame);
#ifdef __cplusplus
}