diff options
author | Brett Cannon <brett@python.org> | 2013-07-06 22:05:02 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2013-07-06 22:05:02 (GMT) |
commit | b1f7632c1c54ef7648dfa14753b5bdeb9f02781d (patch) | |
tree | 8ee99a2d8ca9381bb11074703578adbf4e3f3759 | |
parent | 7e5d55705c2694e941047c5d3aac280211f566ce (diff) | |
parent | 5bfa8671bcce1fbac3964f13f5f93489f2be7da9 (diff) | |
download | cpython-b1f7632c1c54ef7648dfa14753b5bdeb9f02781d.zip cpython-b1f7632c1c54ef7648dfa14753b5bdeb9f02781d.tar.gz cpython-b1f7632c1c54ef7648dfa14753b5bdeb9f02781d.tar.bz2 |
merge
-rw-r--r-- | Modules/_collectionsmodule.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 376a8e6..0a98e01 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -805,17 +805,17 @@ deque_traverse(dequeobject *deque, visitproc visit, void *arg) 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; } |