summaryrefslogtreecommitdiffstats
path: root/Modules/itertoolsmodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-03-21 06:53:25 (GMT)
committerGitHub <noreply@github.com>2017-03-21 06:53:25 (GMT)
commitfff9a31a91283c39c363af219e595eab7d4da6f7 (patch)
tree0dfdec9e4e3e7caec6804bcc1fef1f2c19b9e532 /Modules/itertoolsmodule.c
parentc61ac1642d19f54c7b755098230967ad2e603180 (diff)
downloadcpython-fff9a31a91283c39c363af219e595eab7d4da6f7.zip
cpython-fff9a31a91283c39c363af219e595eab7d4da6f7.tar.gz
cpython-fff9a31a91283c39c363af219e595eab7d4da6f7.tar.bz2
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 7cbee2b..f867252 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;