[Python-checkins] cpython (merge default -> default): merge

brett.cannon python-checkins at python.org
Sun Jul 7 00:05:16 CEST 2013


http://hg.python.org/cpython/rev/e8a1b4bcabcb
changeset:   84469:e8a1b4bcabcb
parent:      84468:e80634ad5a0e
parent:      84466:3555cc0ca35b
user:        Brett Cannon <brett at python.org>
date:        Sat Jul 06 18:05:02 2013 -0400
summary:
  merge

files:
  Modules/_collectionsmodule.c |  12 ++++++------
  1 files changed, 6 insertions(+), 6 deletions(-)


diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -805,17 +805,17 @@
     Py_ssize_t index;
     Py_ssize_t indexlo = deque->leftindex;
 
-    for (b = deque->leftblock; b != NULL; b = b->rightlink) {
-        const Py_ssize_t indexhi = b == deque->rightblock ?
-                                 deque->rightindex :
-                     BLOCKLEN - 1;
-
-        for (index = indexlo; index <= indexhi; ++index) {
+    for (b = deque->leftblock; b != deque->rightblock; b = b->rightlink) {
+        for (index = indexlo; index < BLOCKLEN ; index++) {
             item = b->data[index];
             Py_VISIT(item);
         }
         indexlo = 0;
     }
+    for (index = indexlo; index <= deque->rightindex; index++) {
+        item = b->data[index];
+        Py_VISIT(item);
+    }
     return 0;
 }
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list