]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41078: Rename pycore_tupleobject.h to pycore_tuple.h (GH-21056)
authorVictor Stinner <vstinner@python.org>
Mon, 22 Jun 2020 15:27:35 +0000 (17:27 +0200)
committerGitHub <noreply@github.com>
Mon, 22 Jun 2020 15:27:35 +0000 (17:27 +0200)
17 files changed:
Include/internal/pycore_tuple.h [moved from Include/internal/pycore_tupleobject.h with 75% similarity]
Makefile.pre.in
Modules/_functoolsmodule.c
Modules/itertoolsmodule.c
Objects/call.c
Objects/codeobject.c
Objects/descrobject.c
Objects/funcobject.c
Objects/listobject.c
Objects/rangeobject.c
Objects/structseq.c
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters
Python/bltinmodule.c
Python/ceval.c
Python/getargs.c
Python/sysmodule.c

similarity index 75%
rename from Include/internal/pycore_tupleobject.h
rename to Include/internal/pycore_tuple.h
index f95f16c0ed02f2d201ea5809bbb604c048e03778..5353e18d08327d96ac0bbbfc4ebd7127f34ad434 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef Py_INTERNAL_TUPLEOBJECT_H
-#define Py_INTERNAL_TUPLEOBJECT_H
+#ifndef Py_INTERNAL_TUPLE_H
+#define Py_INTERNAL_TUPLE_H
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -11,9 +11,10 @@ extern "C" {
 #include "tupleobject.h"   /* _PyTuple_CAST() */
 
 #define _PyTuple_ITEMS(op) (_PyTuple_CAST(op)->ob_item)
+
 PyAPI_FUNC(PyObject *) _PyTuple_FromArray(PyObject *const *, Py_ssize_t);
 
 #ifdef __cplusplus
 }
 #endif
-#endif   /* !Py_INTERNAL_TUPLEOBJECT_H */
+#endif   /* !Py_INTERNAL_TUPLE_H */
index 24dddcf56f8fa356891f3df2b71d0a622233143c..a52a97f7969a7faacccdc6d9e37241ff1f916301 100644 (file)
@@ -1120,7 +1120,7 @@ PYTHON_HEADERS= \
                $(srcdir)/Include/internal/pycore_runtime.h \
                $(srcdir)/Include/internal/pycore_sysmodule.h \
                $(srcdir)/Include/internal/pycore_traceback.h \
-               $(srcdir)/Include/internal/pycore_tupleobject.h \
+               $(srcdir)/Include/internal/pycore_tuple.h \
                $(srcdir)/Include/internal/pycore_warnings.h \
                $(DTRACE_HEADERS)
 
index f1ee23f294fa351336cc3f7526f1c596274467fc..8120140afac05824f42e330eb7c10419cd5e145d 100644 (file)
@@ -1,6 +1,6 @@
 #include "Python.h"
 #include "pycore_pystate.h"       // _PyThreadState_GET()
-#include "pycore_tupleobject.h"
+#include "pycore_tuple.h"         // _PyTuple_ITEMS()
 #include "structmember.h"         // PyMemberDef
 
 /* _functools module written and maintained
index 3f2f7165b171b575805b633578646dd35b5fa1e4..3809dc3843c1420fd9ac5c5f45bc8702ea4c308f 100644 (file)
@@ -1,7 +1,7 @@
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
-#include "pycore_tupleobject.h"
+#include "pycore_tuple.h"         // _PyTuple_ITEMS()
 #include <stddef.h>               // offsetof()
 
 /* Itertools module written and maintained
index 61426c7e09e4e71b2bad982b4988b61da926527f..30fa14ccfd765dd7a5a1aecc2e69941c96b23c01 100644 (file)
@@ -1,11 +1,11 @@
 #include "Python.h"
-#include "pycore_call.h"
-#include "pycore_ceval.h"        // _PyEval_EvalFrame()
-#include "pycore_object.h"
-#include "pycore_pyerrors.h"
-#include "pycore_pystate.h"      // _PyThreadState_GET()
-#include "pycore_tupleobject.h"
-#include "frameobject.h"
+#include "pycore_call.h"          // _PyObject_CallNoArgTstate()
+#include "pycore_ceval.h"         // _PyEval_EvalFrame()
+#include "pycore_object.h"        // _PyObject_GC_TRACK()
+#include "pycore_pyerrors.h"      // _PyErr_Occurred()
+#include "pycore_pystate.h"       // _PyThreadState_GET()
+#include "pycore_tuple.h"         // _PyTuple_ITEMS()
+#include "frameobject.h"          // _PyFrame_New_NoTrack()
 
 
 static PyObject *const *
index cb4fb6812433366c59dadc68805b8e6be2367b19..49011db1014e7db87fa6bcb99ca9304a4624c9d1 100644 (file)
@@ -4,10 +4,10 @@
 #include "code.h"
 #include "opcode.h"
 #include "structmember.h"         // PyMemberDef
-#include "pycore_code.h"
+#include "pycore_code.h"          // _PyOpcache
 #include "pycore_interp.h"        // PyInterpreterState.co_extra_freefuncs
 #include "pycore_pystate.h"       // _PyInterpreterState_GET()
-#include "pycore_tupleobject.h"
+#include "pycore_tuple.h"         // _PyTuple_ITEMS()
 #include "clinic/codeobject.c.h"
 
 /* Holder for co_extra information */
index fce9cdd309077ea27b435b229cafae4185c06e33..a8ce13c7aa4baba7733afb8625ab4efc7b7ed6d9 100644 (file)
@@ -1,10 +1,10 @@
 /* Descriptors -- a new, flexible way to describe attributes */
 
 #include "Python.h"
-#include "pycore_ceval.h"        // _Py_EnterRecursiveCall()
-#include "pycore_object.h"
-#include "pycore_pystate.h"      // _PyThreadState_GET()
-#include "pycore_tupleobject.h"
+#include "pycore_ceval.h"         // _Py_EnterRecursiveCall()
+#include "pycore_object.h"        // _PyObject_GC_UNTRACK()
+#include "pycore_pystate.h"       // _PyThreadState_GET()
+#include "pycore_tuple.h"         // _PyTuple_ITEMS()
 #include "structmember.h"         // PyMemberDef
 
 _Py_IDENTIFIER(getattr);
index bd24f67b9740af2a696ac5c57f3e2d0c7a066a97..09a188664e8611afd417081a378cab71b07ba14a 100644 (file)
@@ -3,7 +3,6 @@
 
 #include "Python.h"
 #include "pycore_object.h"
-#include "pycore_tupleobject.h"
 #include "code.h"
 #include "structmember.h"         // PyMemberDef
 
index 22cdbe3cfdd41d3bcfbd5f9d6f2ca498389e28da..261a0fdfffae0d9e8b63d8a6288122ffa560824b 100644 (file)
@@ -1,10 +1,10 @@
 /* List object implementation */
 
 #include "Python.h"
-#include "pycore_abstract.h"   // _PyIndex_Check()
-#include "pycore_object.h"
-#include "pycore_tupleobject.h"
-#include "pycore_accu.h"
+#include "pycore_abstract.h"      // _PyIndex_Check()
+#include "pycore_interp.h"        // PyInterpreterState.list
+#include "pycore_object.h"        // _PyObject_GC_TRACK()
+#include "pycore_tuple.h"         // _PyTuple_FromArray()
 
 #ifdef STDC_HEADERS
 #include <stddef.h>
index 751dbb9815d822b195614ba6011d861b324046fa..ba6d4257174950f730b4b7817247f7f0df9a7ed6 100644 (file)
@@ -1,8 +1,8 @@
 /* Range object implementation */
 
 #include "Python.h"
-#include "pycore_abstract.h"   // _PyIndex_Check()
-#include "pycore_tupleobject.h"
+#include "pycore_abstract.h"      // _PyIndex_Check()
+#include "pycore_tuple.h"         // _PyTuple_ITEMS()
 #include "structmember.h"         // PyMemberDef
 
 /* Support objects whose length is > PY_SSIZE_T_MAX.
index b17b1f99a5bc629cdad2282e91114636eca3e698..bd20ce3fbdcb942ffd484def1f0210cadf9261c9 100644 (file)
@@ -8,8 +8,8 @@
 */
 
 #include "Python.h"
-#include "pycore_tupleobject.h"
-#include "pycore_object.h"
+#include "pycore_tuple.h"         // _PyTuple_FromArray()
+#include "pycore_object.h"        // _PyObject_GC_TRACK()
 #include "structmember.h"         // PyMemberDef
 
 static const char visible_length_key[] = "n_sequence_fields";
index fc99d7748a01fc0c9d9701db7ca2a77ea303cc15..00714757f64f2f0ca1d78a6b22ee30b527aa44a9 100644 (file)
     <ClInclude Include="..\Include\internal\pycore_runtime.h" />
     <ClInclude Include="..\Include\internal\pycore_sysmodule.h" />
     <ClInclude Include="..\Include\internal\pycore_traceback.h" />
-    <ClInclude Include="..\Include\internal\pycore_tupleobject.h" />
+    <ClInclude Include="..\Include\internal\pycore_tuple.h" />
     <ClInclude Include="..\Include\internal\pycore_warnings.h" />
     <ClInclude Include="..\Include\interpreteridobject.h" />
     <ClInclude Include="..\Include\intrcheck.h" />
index 12f05acc3a74a22c5a9af60d4e6504dd3d052220..ddcdaf471901cdff5e0d581aec210e9f721bb661 100644 (file)
     <ClInclude Include="..\Include\internal\pycore_traceback.h">
       <Filter>Include</Filter>
     </ClInclude>
-    <ClInclude Include="..\Include\internal\pycore_tupleobject.h">
+    <ClInclude Include="..\Include\internal\pycore_tuple.h">
       <Filter>Include</Filter>
     </ClInclude>
     <ClInclude Include="..\Include\internal\pycore_warnings.h">
index c6ede1cd7f6d6bd2d206666e511e94eca3f39ece..a582ccda2c384335a0ee3c556d6ee8599e65fd63 100644 (file)
@@ -4,10 +4,9 @@
 #include <ctype.h>
 #include "ast.h"
 #undef Yield   /* undefine macro conflicting with <winbase.h> */
-#include "pycore_object.h"
-#include "pycore_pyerrors.h"
-#include "pycore_pystate.h"      // _PyThreadState_GET()
-#include "pycore_tupleobject.h"
+#include "pycore_pyerrors.h"      // _PyErr_NoMemory()
+#include "pycore_pystate.h"       // _PyThreadState_GET()
+#include "pycore_tuple.h"         // _PyTuple_FromArray()
 
 _Py_IDENTIFIER(__builtins__);
 _Py_IDENTIFIER(__dict__);
index 2bd7cb3ef53137e9a5e140f05d7723fd97067d45..0386929a5b2b376ce1c08c4a9d91d0bdbcb5fbdf 100644 (file)
 
 #include "Python.h"
 #include "pycore_abstract.h"      // _PyIndex_Check()
-#include "pycore_call.h"
-#include "pycore_ceval.h"
-#include "pycore_code.h"
-#include "pycore_initconfig.h"
-#include "pycore_object.h"
-#include "pycore_pyerrors.h"
-#include "pycore_pylifecycle.h"
+#include "pycore_call.h"          // _PyObject_FastCallDictTstate()
+#include "pycore_ceval.h"         // _PyEval_SignalAsyncExc()
+#include "pycore_code.h"          // _PyCode_InitOpcache()
+#include "pycore_initconfig.h"    // _PyStatus_OK()
+#include "pycore_object.h"        // _PyObject_GC_TRACK()
+#include "pycore_pyerrors.h"      // _PyErr_Fetch()
+#include "pycore_pylifecycle.h"   // _PyErr_Print()
 #include "pycore_pymem.h"         // _PyMem_IsPtrFreed()
 #include "pycore_pystate.h"       // _PyInterpreterState_GET()
-#include "pycore_sysmodule.h"
-#include "pycore_tupleobject.h"
+#include "pycore_sysmodule.h"     // _PySys_Audit()
+#include "pycore_tuple.h"         // _PyTuple_ITEMS()
 
 #include "code.h"
 #include "dictobject.h"
index aaf687a46b7f674617fde34bff113d52547f4148..c85ff6d4777d2cebc403508e429db252e3a6f95f 100644 (file)
@@ -2,7 +2,7 @@
 /* New getargs implementation */
 
 #include "Python.h"
-#include "pycore_tupleobject.h"
+#include "pycore_tuple.h"         // _PyTuple_ITEMS()
 
 #include <ctype.h>
 #include <float.h>
index 3e4115fe8e1f93676d067b0f91934b7992d008e5..f3b5a6afdf1e537393aa2be05a99c49c005e7c85 100644 (file)
@@ -15,18 +15,18 @@ Data members:
 */
 
 #include "Python.h"
-#include "code.h"
-#include "frameobject.h"          // PyFrame_GetBack()
 #include "pycore_ceval.h"         // _Py_RecursionLimitLowerWaterMark()
-#include "pycore_initconfig.h"
-#include "pycore_object.h"
-#include "pycore_pathconfig.h"
-#include "pycore_pyerrors.h"
-#include "pycore_pylifecycle.h"
+#include "pycore_initconfig.h"    // _PyStatus_EXCEPTION()
+#include "pycore_object.h"        // _PyObject_IS_GC()
+#include "pycore_pathconfig.h"    // _PyPathConfig_ComputeSysPath0()
+#include "pycore_pyerrors.h"      // _PyErr_Fetch()
+#include "pycore_pylifecycle.h"   // _PyErr_WriteUnraisableDefaultHook()
 #include "pycore_pymem.h"         // _PyMem_SetDefaultAllocator()
 #include "pycore_pystate.h"       // _PyThreadState_GET()
-#include "pycore_tupleobject.h"
+#include "pycore_tuple.h"         // _PyTuple_FromArray()
 
+#include "code.h"
+#include "frameobject.h"          // PyFrame_GetBack()
 #include "pydtrace.h"
 #include "osdefs.h"               // DELIM
 #include <locale.h>