summaryrefslogtreecommitdiff
path: root/Modules/itertoolsmodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-03-21 08:53:25 +0200
committerGitHub <noreply@github.com>2017-03-21 08:53:25 +0200
commitfff9a31a91283c39c363af219e595eab7d4da6f7 (patch)
tree0dfdec9e4e3e7caec6804bcc1fef1f2c19b9e532 /Modules/itertoolsmodule.c
parentc61ac1642d19f54c7b755098230967ad2e603180 (diff)
downloadcpython-git-fff9a31a91283c39c363af219e595eab7d4da6f7.tar.gz
bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. (#748)
Diffstat (limited to 'Modules/itertoolsmodule.c')
-rw-r--r--Modules/itertoolsmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 7cbee2b2fc..f867252481 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -942,11 +942,11 @@ cycle_next(cycleobject *lz)
return NULL;
Py_CLEAR(lz->it);
}
- if (Py_SIZE(lz->saved) == 0)
+ if (PyList_GET_SIZE(lz->saved) == 0)
return NULL;
item = PyList_GET_ITEM(lz->saved, lz->index);
lz->index++;
- if (lz->index >= Py_SIZE(lz->saved))
+ if (lz->index >= PyList_GET_SIZE(lz->saved))
lz->index = 0;
Py_INCREF(item);
return item;