]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-93937, C API: Move PyFrame_GetBack() to Python.h (#93938) (#94000)
authorVictor Stinner <vstinner@python.org>
Mon, 20 Jun 2022 13:47:41 +0000 (15:47 +0200)
committerGitHub <noreply@github.com>
Mon, 20 Jun 2022 13:47:41 +0000 (15:47 +0200)
commit96254a9acd0d9dbb49b7d54fd529223b2253245b
treeea7c9ead2243769c832a4d0b9c77b5c1155a54e4
parent81686e701cda58fc155f9bbd2fe07c523185914b
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)
21 files changed:
Doc/whatsnew/3.11.rst
Include/cpython/frameobject.h
Include/cpython/pyframe.h [new file with mode: 0644]
Include/pyframe.h
Makefile.pre.in
Misc/NEWS.d/next/C API/2022-06-17-13-41-38.gh-issue-93937.uKVTEh.rst [new file with mode: 0644]
Modules/_ctypes/callbacks.c
Modules/_testcapimodule.c
Modules/_xxsubinterpretersmodule.c
Modules/faulthandler.c
Modules/pyexpat.c
Objects/object.c
Objects/typeobject.c
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters
Python/_warnings.c
Python/ceval.c
Python/frame.c
Python/suggestions.c
Python/sysmodule.c
Python/traceback.c