]> granicus.if.org Git - python/commitdiff
Minor fixup. maxlen is already known.
authorRaymond Hettinger <python@rcn.com>
Mon, 12 Oct 2015 05:52:54 +0000 (22:52 -0700)
committerRaymond Hettinger <python@rcn.com>
Mon, 12 Oct 2015 05:52:54 +0000 (22:52 -0700)
Modules/_collectionsmodule.c

index 3c8e0259c4ab809a3e880ff966993897b45f618b..cef92c0b81499d3c549df45f12c0013be43caf77 100644 (file)
@@ -399,7 +399,7 @@ deque_extend(dequeobject *deque, PyObject *iterable)
     if (it == NULL)
         return NULL;
 
-    if (deque->maxlen == 0)
+    if (maxlen == 0)
         return consume_iterator(it);
 
     iternext = *Py_TYPE(it)->tp_iternext;
@@ -463,7 +463,7 @@ deque_extendleft(dequeobject *deque, PyObject *iterable)
     if (it == NULL)
         return NULL;
 
-    if (deque->maxlen == 0)
+    if (maxlen == 0)
         return consume_iterator(it);
 
     iternext = *Py_TYPE(it)->tp_iternext;