summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-07-15 21:32:18 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-07-15 21:32:18 (GMT)
commit67115a2b0206b9c9352dc5bed42d93bf38097073 (patch)
treeb2414559e5ef6d5a163922750256d18bfc5d7a02
parent4f9013759bc7c7560ac35d0a4a2d7b382d5a004a (diff)
downloadcpython-67115a2b0206b9c9352dc5bed42d93bf38097073.zip
cpython-67115a2b0206b9c9352dc5bed42d93bf38097073.tar.gz
cpython-67115a2b0206b9c9352dc5bed42d93bf38097073.tar.bz2
Apply VISIT macro.
-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;
}