Commit b1f7632c authored by Brett Cannon's avatar Brett Cannon

merge

parents 7e5d5570 5bfa8671
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment