summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/collectionsmodule.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/Modules/collectionsmodule.c b/Modules/collectionsmodule.c
index c72c7a6..9b8a091 100644
--- a/Modules/collectionsmodule.c
+++ b/Modules/collectionsmodule.c
@@ -465,19 +465,17 @@ deque_traverse(dequeobject *deque, visitproc visit, void *arg)
{
block * b = deque->leftblock;
int index = deque->leftindex;
- int err;
PyObject *item;
while (b != deque->rightblock || index <= deque->rightindex) {
item = b->data[index];
index++;
- if (index == BLOCKLEN && b->rightlink != NULL) {
+ if (index == BLOCKLEN ) {
+ assert(b->rightlink != NULL);
b = b->rightlink;
index = 0;
}
- err = visit(item, arg);
- if (err)
- return err;
+ Py_VISIT(item);
}
return 0;
}