Skip to content

Commit 384621c

Browse files
authored
bpo-41078: Rename pycore_tupleobject.h to pycore_tuple.h (GH-21056)
1 parent 9e27bc0 commit 384621c

17 files changed

+51
-52
lines changed

Include/internal/pycore_tupleobject.h renamed to Include/internal/pycore_tuple.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef Py_INTERNAL_TUPLEOBJECT_H
2-
#define Py_INTERNAL_TUPLEOBJECT_H
1+
#ifndef Py_INTERNAL_TUPLE_H
2+
#define Py_INTERNAL_TUPLE_H
33
#ifdef __cplusplus
44
extern "C" {
55
#endif
@@ -11,9 +11,10 @@ extern "C" {
1111
#include "tupleobject.h" /* _PyTuple_CAST() */
1212

1313
#define _PyTuple_ITEMS(op) (_PyTuple_CAST(op)->ob_item)
14+
1415
PyAPI_FUNC(PyObject *) _PyTuple_FromArray(PyObject *const *, Py_ssize_t);
1516

1617
#ifdef __cplusplus
1718
}
1819
#endif
19-
#endif /* !Py_INTERNAL_TUPLEOBJECT_H */
20+
#endif /* !Py_INTERNAL_TUPLE_H */

Makefile.pre.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ PYTHON_HEADERS= \
11201120
$(srcdir)/Include/internal/pycore_runtime.h \
11211121
$(srcdir)/Include/internal/pycore_sysmodule.h \
11221122
$(srcdir)/Include/internal/pycore_traceback.h \
1123-
$(srcdir)/Include/internal/pycore_tupleobject.h \
1123+
$(srcdir)/Include/internal/pycore_tuple.h \
11241124
$(srcdir)/Include/internal/pycore_warnings.h \
11251125
$(DTRACE_HEADERS)
11261126

Modules/_functoolsmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "Python.h"
22
#include "pycore_pystate.h" // _PyThreadState_GET()
3-
#include "pycore_tupleobject.h"
3+
#include "pycore_tuple.h" // _PyTuple_ITEMS()
44
#include "structmember.h" // PyMemberDef
55

66
/* _functools module written and maintained

Modules/itertoolsmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
#define PY_SSIZE_T_CLEAN
33
#include "Python.h"
4-
#include "pycore_tupleobject.h"
4+
#include "pycore_tuple.h" // _PyTuple_ITEMS()
55
#include <stddef.h> // offsetof()
66

77
/* Itertools module written and maintained

Objects/call.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#include "Python.h"
2-
#include "pycore_call.h"
3-
#include "pycore_ceval.h" // _PyEval_EvalFrame()
4-
#include "pycore_object.h"
5-
#include "pycore_pyerrors.h"
6-
#include "pycore_pystate.h" // _PyThreadState_GET()
7-
#include "pycore_tupleobject.h"
8-
#include "frameobject.h"
2+
#include "pycore_call.h" // _PyObject_CallNoArgTstate()
3+
#include "pycore_ceval.h" // _PyEval_EvalFrame()
4+
#include "pycore_object.h" // _PyObject_GC_TRACK()
5+
#include "pycore_pyerrors.h" // _PyErr_Occurred()
6+
#include "pycore_pystate.h" // _PyThreadState_GET()
7+
#include "pycore_tuple.h" // _PyTuple_ITEMS()
8+
#include "frameobject.h" // _PyFrame_New_NoTrack()
99

1010

1111
static PyObject *const *

Objects/codeobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#include "code.h"
55
#include "opcode.h"
66
#include "structmember.h" // PyMemberDef
7-
#include "pycore_code.h"
7+
#include "pycore_code.h" // _PyOpcache
88
#include "pycore_interp.h" // PyInterpreterState.co_extra_freefuncs
99
#include "pycore_pystate.h" // _PyInterpreterState_GET()
10-
#include "pycore_tupleobject.h"
10+
#include "pycore_tuple.h" // _PyTuple_ITEMS()
1111
#include "clinic/codeobject.c.h"
1212

1313
/* Holder for co_extra information */

Objects/descrobject.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* Descriptors -- a new, flexible way to describe attributes */
22

33
#include "Python.h"
4-
#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
5-
#include "pycore_object.h"
6-
#include "pycore_pystate.h" // _PyThreadState_GET()
7-
#include "pycore_tupleobject.h"
4+
#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
5+
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
6+
#include "pycore_pystate.h" // _PyThreadState_GET()
7+
#include "pycore_tuple.h" // _PyTuple_ITEMS()
88
#include "structmember.h" // PyMemberDef
99

1010
_Py_IDENTIFIER(getattr);

Objects/funcobject.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include "Python.h"
55
#include "pycore_object.h"
6-
#include "pycore_tupleobject.h"
76
#include "code.h"
87
#include "structmember.h" // PyMemberDef
98

Objects/listobject.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* List object implementation */
22

33
#include "Python.h"
4-
#include "pycore_abstract.h" // _PyIndex_Check()
5-
#include "pycore_object.h"
6-
#include "pycore_tupleobject.h"
7-
#include "pycore_accu.h"
4+
#include "pycore_abstract.h" // _PyIndex_Check()
5+
#include "pycore_interp.h" // PyInterpreterState.list
6+
#include "pycore_object.h" // _PyObject_GC_TRACK()
7+
#include "pycore_tuple.h" // _PyTuple_FromArray()
88

99
#ifdef STDC_HEADERS
1010
#include <stddef.h>

Objects/rangeobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* Range object implementation */
22

33
#include "Python.h"
4-
#include "pycore_abstract.h" // _PyIndex_Check()
5-
#include "pycore_tupleobject.h"
4+
#include "pycore_abstract.h" // _PyIndex_Check()
5+
#include "pycore_tuple.h" // _PyTuple_ITEMS()
66
#include "structmember.h" // PyMemberDef
77

88
/* Support objects whose length is > PY_SSIZE_T_MAX.

0 commit comments

Comments
 (0)