Skip to content

Commit b59eb46

Browse files
author
rhettinger
committed
Renamed PyObject_GenericGetIter to PyObject_SelfIter
to more accurately describe what the function does. Suggested by Thomas Wouters. git-svn-id: http://svn.python.org/projects/python/trunk@31879 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent a4cc06b commit b59eb46

File tree

13 files changed

+25
-25
lines changed

13 files changed

+25
-25
lines changed

Include/object.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ PyAPI_FUNC(PyObject *) PyObject_GetAttr(PyObject *, PyObject *);
385385
PyAPI_FUNC(int) PyObject_SetAttr(PyObject *, PyObject *, PyObject *);
386386
PyAPI_FUNC(int) PyObject_HasAttr(PyObject *, PyObject *);
387387
PyAPI_FUNC(PyObject **) _PyObject_GetDictPtr(PyObject *);
388-
PyAPI_FUNC(PyObject *) PyObject_GenericGetIter(PyObject *);
388+
PyAPI_FUNC(PyObject *) PyObject_SelfIter(PyObject *);
389389
PyAPI_FUNC(PyObject *) PyObject_GenericGetAttr(PyObject *, PyObject *);
390390
PyAPI_FUNC(int) PyObject_GenericSetAttr(PyObject *,
391391
PyObject *, PyObject *);

Misc/NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Build
8686
C API
8787
-----
8888

89-
- Added PyObject_GenericGetIter() to fill the tp_iter slot for the
89+
- Added PyObject_SelfIter() to fill the tp_iter slot for the
9090
typical case where the method returns its self argument.
9191

9292
- The extended type structure used for heap types (new-style

Modules/_hotshot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ static PyTypeObject LogReaderType = {
13451345
0, /* tp_clear */
13461346
0, /* tp_richcompare */
13471347
0, /* tp_weaklistoffset */
1348-
PyObject_GenericGetIter, /* tp_iter */
1348+
PyObject_SelfIter, /* tp_iter */
13491349
(iternextfunc)logreader_tp_iternext,/* tp_iternext */
13501350
logreader_methods, /* tp_methods */
13511351
logreader_members, /* tp_members */

Modules/arraymodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2014,7 +2014,7 @@ static PyTypeObject PyArrayIter_Type = {
20142014
0, /* tp_clear */
20152015
0, /* tp_richcompare */
20162016
0, /* tp_weaklistoffset */
2017-
PyObject_GenericGetIter, /* tp_iter */
2017+
PyObject_SelfIter, /* tp_iter */
20182018
(iternextfunc)arrayiter_next, /* tp_iternext */
20192019
0, /* tp_methods */
20202020
};

Modules/itertoolsmodule.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ PyTypeObject cycle_type = {
140140
0, /* tp_clear */
141141
0, /* tp_richcompare */
142142
0, /* tp_weaklistoffset */
143-
PyObject_GenericGetIter, /* tp_iter */
143+
PyObject_SelfIter, /* tp_iter */
144144
(iternextfunc)cycle_next, /* tp_iternext */
145145
0, /* tp_methods */
146146
0, /* tp_members */
@@ -289,7 +289,7 @@ PyTypeObject dropwhile_type = {
289289
0, /* tp_clear */
290290
0, /* tp_richcompare */
291291
0, /* tp_weaklistoffset */
292-
PyObject_GenericGetIter, /* tp_iter */
292+
PyObject_SelfIter, /* tp_iter */
293293
(iternextfunc)dropwhile_next, /* tp_iternext */
294294
0, /* tp_methods */
295295
0, /* tp_members */
@@ -437,7 +437,7 @@ PyTypeObject takewhile_type = {
437437
0, /* tp_clear */
438438
0, /* tp_richcompare */
439439
0, /* tp_weaklistoffset */
440-
PyObject_GenericGetIter, /* tp_iter */
440+
PyObject_SelfIter, /* tp_iter */
441441
(iternextfunc)takewhile_next, /* tp_iternext */
442442
0, /* tp_methods */
443443
0, /* tp_members */
@@ -607,7 +607,7 @@ PyTypeObject islice_type = {
607607
0, /* tp_clear */
608608
0, /* tp_richcompare */
609609
0, /* tp_weaklistoffset */
610-
PyObject_GenericGetIter, /* tp_iter */
610+
PyObject_SelfIter, /* tp_iter */
611611
(iternextfunc)islice_next, /* tp_iternext */
612612
0, /* tp_methods */
613613
0, /* tp_members */
@@ -746,7 +746,7 @@ PyTypeObject starmap_type = {
746746
0, /* tp_clear */
747747
0, /* tp_richcompare */
748748
0, /* tp_weaklistoffset */
749-
PyObject_GenericGetIter, /* tp_iter */
749+
PyObject_SelfIter, /* tp_iter */
750750
(iternextfunc)starmap_next, /* tp_iternext */
751751
0, /* tp_methods */
752752
0, /* tp_members */
@@ -933,7 +933,7 @@ PyTypeObject imap_type = {
933933
0, /* tp_clear */
934934
0, /* tp_richcompare */
935935
0, /* tp_weaklistoffset */
936-
PyObject_GenericGetIter, /* tp_iter */
936+
PyObject_SelfIter, /* tp_iter */
937937
(iternextfunc)imap_next, /* tp_iternext */
938938
0, /* tp_methods */
939939
0, /* tp_members */
@@ -1068,7 +1068,7 @@ PyTypeObject chain_type = {
10681068
0, /* tp_clear */
10691069
0, /* tp_richcompare */
10701070
0, /* tp_weaklistoffset */
1071-
PyObject_GenericGetIter, /* tp_iter */
1071+
PyObject_SelfIter, /* tp_iter */
10721072
(iternextfunc)chain_next, /* tp_iternext */
10731073
0, /* tp_methods */
10741074
0, /* tp_members */
@@ -1217,7 +1217,7 @@ PyTypeObject ifilter_type = {
12171217
0, /* tp_clear */
12181218
0, /* tp_richcompare */
12191219
0, /* tp_weaklistoffset */
1220-
PyObject_GenericGetIter, /* tp_iter */
1220+
PyObject_SelfIter, /* tp_iter */
12211221
(iternextfunc)ifilter_next, /* tp_iternext */
12221222
0, /* tp_methods */
12231223
0, /* tp_members */
@@ -1366,7 +1366,7 @@ PyTypeObject ifilterfalse_type = {
13661366
0, /* tp_clear */
13671367
0, /* tp_richcompare */
13681368
0, /* tp_weaklistoffset */
1369-
PyObject_GenericGetIter, /* tp_iter */
1369+
PyObject_SelfIter, /* tp_iter */
13701370
(iternextfunc)ifilterfalse_next, /* tp_iternext */
13711371
0, /* tp_methods */
13721372
0, /* tp_members */
@@ -1450,7 +1450,7 @@ PyTypeObject count_type = {
14501450
0, /* tp_clear */
14511451
0, /* tp_richcompare */
14521452
0, /* tp_weaklistoffset */
1453-
PyObject_GenericGetIter, /* tp_iter */
1453+
PyObject_SelfIter, /* tp_iter */
14541454
(iternextfunc)count_next, /* tp_iternext */
14551455
0, /* tp_methods */
14561456
0, /* tp_members */
@@ -1634,7 +1634,7 @@ PyTypeObject izip_type = {
16341634
0, /* tp_clear */
16351635
0, /* tp_richcompare */
16361636
0, /* tp_weaklistoffset */
1637-
PyObject_GenericGetIter, /* tp_iter */
1637+
PyObject_SelfIter, /* tp_iter */
16381638
(iternextfunc)izip_next, /* tp_iternext */
16391639
0, /* tp_methods */
16401640
0, /* tp_members */
@@ -1741,7 +1741,7 @@ PyTypeObject repeat_type = {
17411741
0, /* tp_clear */
17421742
0, /* tp_richcompare */
17431743
0, /* tp_weaklistoffset */
1744-
PyObject_GenericGetIter, /* tp_iter */
1744+
PyObject_SelfIter, /* tp_iter */
17451745
(iternextfunc)repeat_next, /* tp_iternext */
17461746
0, /* tp_methods */
17471747
0, /* tp_members */

Modules/xreadlinesmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static PyTypeObject XReadlinesObject_Type = {
152152
0, /* tp_clear */
153153
0, /* tp_richcompare */
154154
0, /* tp_weaklistoffset */
155-
PyObject_GenericGetIter, /* tp_iter */
155+
PyObject_SelfIter, /* tp_iter */
156156
(iternextfunc)xreadlines_iternext, /* tp_iternext */
157157
};
158158

Objects/dictobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2062,7 +2062,7 @@ PyTypeObject PyDictIter_Type = {
20622062
0, /* tp_clear */
20632063
0, /* tp_richcompare */
20642064
0, /* tp_weaklistoffset */
2065-
PyObject_GenericGetIter, /* tp_iter */
2065+
PyObject_SelfIter, /* tp_iter */
20662066
(iternextfunc)dictiter_iternext, /* tp_iternext */
20672067
0, /* tp_methods */
20682068
0, /* tp_members */

Objects/enumobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ PyTypeObject PyEnum_Type = {
110110
0, /* tp_clear */
111111
0, /* tp_richcompare */
112112
0, /* tp_weaklistoffset */
113-
PyObject_GenericGetIter, /* tp_iter */
113+
PyObject_SelfIter, /* tp_iter */
114114
(iternextfunc)enum_next, /* tp_iternext */
115115
0, /* tp_methods */
116116
0, /* tp_members */

Objects/iterobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ PyTypeObject PySeqIter_Type = {
9999
0, /* tp_clear */
100100
0, /* tp_richcompare */
101101
0, /* tp_weaklistoffset */
102-
PyObject_GenericGetIter, /* tp_iter */
102+
PyObject_SelfIter, /* tp_iter */
103103
(iternextfunc)iter_iternext, /* tp_iternext */
104104
0, /* tp_methods */
105105
0, /* tp_members */
@@ -216,7 +216,7 @@ PyTypeObject PyCallIter_Type = {
216216
0, /* tp_clear */
217217
0, /* tp_richcompare */
218218
0, /* tp_weaklistoffset */
219-
PyObject_GenericGetIter, /* tp_iter */
219+
PyObject_SelfIter, /* tp_iter */
220220
(iternextfunc)calliter_iternext, /* tp_iternext */
221221
0, /* tp_methods */
222222
0, /* tp_members */

Objects/listobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2450,7 +2450,7 @@ PyTypeObject PyListIter_Type = {
24502450
0, /* tp_clear */
24512451
0, /* tp_richcompare */
24522452
0, /* tp_weaklistoffset */
2453-
PyObject_GenericGetIter, /* tp_iter */
2453+
PyObject_SelfIter, /* tp_iter */
24542454
(iternextfunc)listiter_next, /* tp_iternext */
24552455
0, /* tp_methods */
24562456
0, /* tp_members */

0 commit comments

Comments
 (0)