From 9428c7b8f4d5fdfe9ff598bc37d3d541cc2b43aa Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Thu, 15 Feb 2024 11:58:38 +0900 Subject: [PATCH] Clean up headers --- Include/internal/pycore_interp.h | 3 --- Objects/abstract.c | 1 + Objects/object.c | 2 ++ Objects/tupleobject.c | 2 ++ Python/ceval.c | 1 + Python/gc.c | 1 + Python/gc_free_threading.c | 1 + Python/intrinsics.c | 1 + Python/optimizer.c | 1 + 9 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h index c07447183d62090..b739aae8d038a7e 100644 --- a/Include/internal/pycore_interp.h +++ b/Include/internal/pycore_interp.h @@ -19,19 +19,16 @@ extern "C" { #include "pycore_dict_state.h" // struct _Py_dict_state #include "pycore_dtoa.h" // struct _dtoa_state #include "pycore_exceptions.h" // struct _Py_exc_state -#include "pycore_floatobject.h" // struct _Py_float_state #include "pycore_function.h" // FUNC_MAX_WATCHERS #include "pycore_gc.h" // struct _gc_runtime_state #include "pycore_genobject.h" // struct _Py_async_gen_state #include "pycore_global_objects.h"// struct _Py_interp_cached_objects #include "pycore_import.h" // struct _import_state #include "pycore_instruments.h" // _PY_MONITORING_EVENTS -#include "pycore_list.h" // struct _Py_list_state #include "pycore_mimalloc.h" // struct _mimalloc_interp_state #include "pycore_object_state.h" // struct _py_object_state #include "pycore_obmalloc.h" // struct _obmalloc_state #include "pycore_tstate.h" // _PyThreadStateImpl -#include "pycore_tuple.h" // struct _Py_tuple_state #include "pycore_typeobject.h" // struct types_state #include "pycore_unicodeobject.h" // struct _Py_unicode_state #include "pycore_warnings.h" // struct _warnings_runtime_state diff --git a/Objects/abstract.c b/Objects/abstract.c index 07d4b89fe188c84..d7fc1417cf31b9e 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -7,6 +7,7 @@ #include "pycore_ceval.h" // _Py_EnterRecursiveCallTstate() #include "pycore_crossinterp.h" // _Py_CallInInterpreter() #include "pycore_object.h" // _Py_CheckSlotResult() +#include "pycore_list.h" // _PyList_Extend() #include "pycore_long.h" // _Py_IsNegative #include "pycore_pyerrors.h" // _PyErr_Occurred() #include "pycore_pystate.h" // _PyThreadState_GET() diff --git a/Objects/object.c b/Objects/object.c index 23eab8288a41e8b..9c23c6eaa2b60bd 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -11,6 +11,7 @@ #include "pycore_floatobject.h" // _PyFloat_DebugMallocStats() #include "pycore_initconfig.h" // _PyStatus_EXCEPTION() #include "pycore_hashtable.h" // _Py_hashtable_new() +#include "pycore_list.h" // _PyList_DebugMallocStats() #include "pycore_memoryobject.h" // _PyManagedBuffer_Type #include "pycore_namespace.h" // _PyNamespace_Type #include "pycore_object.h" // PyAPI_DATA() _Py_SwappedOp definition @@ -18,6 +19,7 @@ #include "pycore_pyerrors.h" // _PyErr_Occurred() #include "pycore_pymem.h" // _PyMem_IsPtrFreed() #include "pycore_pystate.h" // _PyThreadState_GET() +#include "pycore_tuple.h" // _PyTuple_DebugMallocStats() #include "pycore_symtable.h" // PySTEntry_Type #include "pycore_typeobject.h" // _PyBufferWrapper_Type #include "pycore_typevarobject.h" // _PyTypeAlias_Type, _Py_initialize_generic diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 1cdf79d95ae352d..5207ea79bf2a98e 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -6,8 +6,10 @@ #include "pycore_ceval.h" // _PyEval_GetBuiltin() #include "pycore_gc.h" // _PyObject_GC_IS_TRACKED() #include "pycore_initconfig.h" // _PyStatus_OK() +#include "pycore_list.h" // _Py_memory_repeat() #include "pycore_modsupport.h" // _PyArg_NoKwnames() #include "pycore_object.h" // _PyObject_GC_TRACK(), _Py_FatalRefcountError(), _PyDebugAllocatorStats() +#include "pycore_tuple.h" // _PyTupleIterObject /*[clinic input] class tuple "PyTupleObject *" "&PyTuple_Type" diff --git a/Python/ceval.c b/Python/ceval.c index 4f2080090861914..60e56e6e4a7428e 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -12,6 +12,7 @@ #include "pycore_instruments.h" #include "pycore_intrinsics.h" #include "pycore_jit.h" +#include "pycore_list.h" // _PyTuple_FromArraySteal() #include "pycore_long.h" // _PyLong_GetZero() #include "pycore_moduleobject.h" // PyModuleObject #include "pycore_object.h" // _PyObject_GC_TRACK() diff --git a/Python/gc.c b/Python/gc.c index 466467602915264..f795a6eb2143e56 100644 --- a/Python/gc.c +++ b/Python/gc.c @@ -12,6 +12,7 @@ #include "pycore_object_alloc.h" // _PyObject_MallocWithType() #include "pycore_pyerrors.h" #include "pycore_pystate.h" // _PyThreadState_GET() +#include "pycore_tuple.h" // _PyTuple_MaybeUntrack() #include "pycore_weakref.h" // _PyWeakref_ClearRef() #include "pydtrace.h" diff --git a/Python/gc_free_threading.c b/Python/gc_free_threading.c index 3dc1dc19182eb41..8aa2af21aa8d381 100644 --- a/Python/gc_free_threading.c +++ b/Python/gc_free_threading.c @@ -11,6 +11,7 @@ #include "pycore_object_stack.h" #include "pycore_pyerrors.h" #include "pycore_pystate.h" // _PyThreadState_GET() +#include "pycore_tuple.h" // _PyTuple_MaybeUntrack #include "pycore_tstate.h" // _PyThreadStateImpl #include "pycore_weakref.h" // _PyWeakref_ClearRef() #include "pydtrace.h" diff --git a/Python/intrinsics.c b/Python/intrinsics.c index d3146973b75178d..3bad6dfb0ad9d1b 100644 --- a/Python/intrinsics.c +++ b/Python/intrinsics.c @@ -10,6 +10,7 @@ #include "pycore_pyerrors.h" // _PyErr_SetString() #include "pycore_runtime.h" // _Py_ID() #include "pycore_sysmodule.h" // _PySys_GetAttr() +#include "pycore_tuple.h" // _PyTuple_FromArray() #include "pycore_typevarobject.h" // _Py_make_typevar() diff --git a/Python/optimizer.c b/Python/optimizer.c index efa19680c9b1f30..df9a613c3b9b7fd 100644 --- a/Python/optimizer.c +++ b/Python/optimizer.c @@ -6,6 +6,7 @@ #include "pycore_opcode_utils.h" // MAX_REAL_OPCODE #include "pycore_optimizer.h" // _Py_uop_analyze_and_optimize() #include "pycore_pystate.h" // _PyInterpreterState_GET() +#include "pycore_tuple.h" // _PyTuple_FromArraySteal() #include "pycore_uop_ids.h" #include "pycore_jit.h" #include "cpython/optimizer.h"