diff options
author | Victor Stinner <vstinner@python.org> | 2022-06-20 13:47:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-20 13:47:41 (GMT) |
commit | 96254a9acd0d9dbb49b7d54fd529223b2253245b (patch) | |
tree | ea7c9ead2243769c832a4d0b9c77b5c1155a54e4 /Python/traceback.c | |
parent | 81686e701cda58fc155f9bbd2fe07c523185914b (diff) | |
download | cpython-96254a9acd0d9dbb49b7d54fd529223b2253245b.zip cpython-96254a9acd0d9dbb49b7d54fd529223b2253245b.tar.gz cpython-96254a9acd0d9dbb49b7d54fd529223b2253245b.tar.bz2 |
gh-93937, C API: Move PyFrame_GetBack() to Python.h (#93938) (#94000)
Move the follow functions and type from frameobject.h to pyframe.h,
so the standard <Python.h> provide frame getter functions:
* PyFrame_Check()
* PyFrame_GetBack()
* PyFrame_GetBuiltins()
* PyFrame_GetGenerator()
* PyFrame_GetGlobals()
* PyFrame_GetLasti()
* PyFrame_GetLocals()
* PyFrame_Type
Remove #include "frameobject.h" from many C files. It's no longer
needed.
(cherry picked from commit 27b989403356ccdd47545a93aeab8434e9c69f21)
Diffstat (limited to 'Python/traceback.c')
-rw-r--r-- | Python/traceback.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/traceback.c b/Python/traceback.c index 3ec0618..0c49a8c 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -3,7 +3,6 @@ #include "Python.h" -#include "frameobject.h" // PyFrame_GetBack() #include "pycore_ast.h" // asdl_seq_* #include "pycore_call.h" // _PyObject_CallMethodFormat() #include "pycore_compile.h" // _PyAST_Optimize @@ -15,7 +14,9 @@ #include "pycore_pyerrors.h" // _PyErr_Fetch() #include "pycore_pystate.h" // _PyThreadState_GET() #include "pycore_traceback.h" // EXCEPTION_TB_HEADER + #include "../Parser/pegen.h" // _PyPegen_byte_offset_to_character_offset() +#include "frameobject.h" // PyFrame_New() #include "structmember.h" // PyMemberDef #include "osdefs.h" // SEP #ifdef HAVE_FCNTL_H |