Apply VISIT macro.

This commit is contained in:
Raymond Hettinger 2004-07-15 21:32:18 +00:00
parent 4f9013759b
commit 67115a2b02
1 changed files with 3 additions and 5 deletions

View File

@ -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;
}