gh-131238: Move _Py_VISIT_STACKREF() to pycore_stackref.h (#131560)

* Move _Py_VISIT_STACKREF() from pycore_gc.h to pycore_stackref.h.
* Remove pycore_interpframe.h include from pycore_genobject.h.
* Remove now useless includes from C files.
* Add pycore_interpframe_structs.h to Makefile.pre.in and
  pythoncore.vcxproj.
This commit is contained in:
Victor Stinner 2025-03-21 23:24:14 +01:00 committed by GitHub
parent cf9d1a4b6b
commit 7101cba6bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 40 additions and 35 deletions

View file

@ -8,9 +8,10 @@ extern "C" {
# error "this header requires Py_BUILD_CORE define"
#endif
#include "pycore_interpframe.h" // _PyInterpreterFrame
#include "pycore_interpframe_structs.h" // _PyGenObject
#include <stddef.h> // offsetof()
static inline
PyGenObject *_PyGen_GetGeneratorFromFrame(_PyInterpreterFrame *frame)