Skip to content

Commit 9e5cb51

Browse files
committed
remove dead code related to firstpass
1 parent 1a8e574 commit 9e5cb51

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Modules/itertoolsmodule.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,6 @@ typedef struct {
11261126
PyObject *it;
11271127
PyObject *saved;
11281128
Py_ssize_t index;
1129-
int firstpass;
11301129
} cycleobject;
11311130

11321131
#define cycleobject_CAST(op) ((cycleobject *)(op))
@@ -1168,7 +1167,6 @@ itertools_cycle_impl(PyTypeObject *type, PyObject *iterable)
11681167
lz->it = it;
11691168
lz->saved = saved;
11701169
lz->index = 0;
1171-
lz->firstpass = 0;
11721170

11731171
return (PyObject *)lz;
11741172
}
@@ -1204,8 +1202,6 @@ cycle_next(PyObject *op)
12041202
if (lz->it != NULL) {
12051203
item = PyIter_Next(lz->it);
12061204
if (item != NULL) {
1207-
if (lz->firstpass)
1208-
return item;
12091205
if (PyList_Append(lz->saved, item)) {
12101206
Py_DECREF(item);
12111207
return NULL;

0 commit comments

Comments
 (0)