diff options
| author | Victor Stinner <vstinner@python.org> | 2025-03-21 22:24:14 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-21 22:24:14 (GMT) |
| commit | 7101cba6bf12639e277f7681b90a70c11368cabb (patch) | |
| tree | 969291af38ec658bf38cb72cce9d7de2139d01bf /Python | |
| parent | cf9d1a4b6b28a76a49edba4028d5533195172287 (diff) | |
| download | cpython-7101cba6bf12639e277f7681b90a70c11368cabb.zip cpython-7101cba6bf12639e277f7681b90a70c11368cabb.tar.gz cpython-7101cba6bf12639e277f7681b90a70c11368cabb.tar.bz2 | |
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.
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/_warnings.c | 4 | ||||
| -rw-r--r-- | Python/frame.c | 12 | ||||
| -rw-r--r-- | Python/intrinsics.c | 9 |
3 files changed, 11 insertions, 14 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 1e90ef0..f9dd00f 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -1,8 +1,8 @@ #include "Python.h" -#include "pycore_frame.h" // PyFrameObject members +#include "pycore_frame.h" // PyFrameObject #include "pycore_genobject.h" // PyAsyncGenObject #include "pycore_import.h" // _PyImport_GetModules() -#include "pycore_interp.h" // PyInterpreterState.warnings +#include "pycore_interpframe.h" // _PyFrame_GetCode() #include "pycore_long.h" // _PyLong_GetZero() #include "pycore_pylifecycle.h" // _Py_IsInterpreterFinalizing() #include "pycore_pystate.h" // _PyThreadState_GET() diff --git a/Python/frame.c b/Python/frame.c index 4622024..b59cb4b 100644 --- a/Python/frame.c +++ b/Python/frame.c @@ -1,13 +1,11 @@ - #define _PY_INTERPRETER #include "Python.h" -#include "frameobject.h" -#include "pycore_code.h" // stats -#include "pycore_frame.h" -#include "pycore_genobject.h" -#include "pycore_object.h" // _PyObject_GC_UNTRACK() -#include "opcode.h" +#include "pycore_frame.h" // _PyFrame_New_NoTrack() +#include "pycore_interpframe.h" // _PyFrame_GetCode() +#include "pycore_genobject.h" // _PyGen_GetGeneratorFromFrame() +#include "pycore_stackref.h" // _Py_VISIT_STACKREF() + int _PyFrame_Traverse(_PyInterpreterFrame *frame, visitproc visit, void *arg) diff --git a/Python/intrinsics.c b/Python/intrinsics.c index f6dfee3..1c7d7ee 100644 --- a/Python/intrinsics.c +++ b/Python/intrinsics.c @@ -2,18 +2,17 @@ #define _PY_INTERPRETER #include "Python.h" -#include "pycore_frame.h" -#include "pycore_function.h" -#include "pycore_global_objects.h" +#include "pycore_compile.h" // _PyCompile_GetUnaryIntrinsicName +#include "pycore_function.h" // _Py_set_function_type_params() #include "pycore_genobject.h" // _PyAsyncGenValueWrapperNew -#include "pycore_compile.h" // _PyCompile_GetUnaryIntrinsicName, etc +#include "pycore_interpframe.h" // _PyFrame_GetLocals() #include "pycore_intrinsics.h" // INTRINSIC_PRINT #include "pycore_pyerrors.h" // _PyErr_SetString() #include "pycore_runtime.h" // _Py_ID() #include "pycore_sysmodule.h" // _PySys_GetRequiredAttr() #include "pycore_tuple.h" // _PyTuple_FromArray() #include "pycore_typevarobject.h" // _Py_make_typevar() -#include "pycore_unicodeobject.h" // _PyUnicode_FromASCII +#include "pycore_unicodeobject.h" // _PyUnicode_FromASCII() /******** Unary functions ********/ |
