summaryrefslogtreecommitdiff
path: root/Modules/itertoolsmodule.c
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2017-01-27 13:05:09 +0000
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2017-01-27 13:05:09 +0000
commitd45d8652710e51576367db00b226b8465e6c5ce6 (patch)
treeeeb12605abc98507852e82848382c2e739991708 /Modules/itertoolsmodule.c
parent6ccbbb38caa79f9eb9b93b5767f3787fc80cbac1 (diff)
parentbbbab3c96168cea9f872f90da0a385b50f62ca70 (diff)
downloadcpython-d45d8652710e51576367db00b226b8465e6c5ce6.tar.gz
Closes #28784: Merged update from 3.6.
Diffstat (limited to 'Modules/itertoolsmodule.c')
-rw-r--r--Modules/itertoolsmodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 6bf04cbee3..7cbee2b2fc 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -4180,7 +4180,7 @@ repeat_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return NULL;
if (kwds != NULL)
- n_kwds = PyDict_Size(kwds);
+ n_kwds = PyDict_GET_SIZE(kwds);
/* Does user supply times argument? */
if ((PyTuple_Size(args) + n_kwds == 2) && cnt < 0)
cnt = 0;
@@ -4331,9 +4331,9 @@ zip_longest_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
PyObject *fillvalue = Py_None;
Py_ssize_t tuplesize = PySequence_Length(args);
- if (kwds != NULL && PyDict_CheckExact(kwds) && PyDict_Size(kwds) > 0) {
+ if (kwds != NULL && PyDict_CheckExact(kwds) && PyDict_GET_SIZE(kwds) > 0) {
fillvalue = PyDict_GetItemString(kwds, "fillvalue");
- if (fillvalue == NULL || PyDict_Size(kwds) > 1) {
+ if (fillvalue == NULL || PyDict_GET_SIZE(kwds) > 1) {
PyErr_SetString(PyExc_TypeError,
"zip_longest() got an unexpected keyword argument");
return NULL;