Kaydet (Commit) 67115a2b authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Apply VISIT macro.

üst 4f901375
...@@ -465,19 +465,17 @@ deque_traverse(dequeobject *deque, visitproc visit, void *arg) ...@@ -465,19 +465,17 @@ deque_traverse(dequeobject *deque, visitproc visit, void *arg)
{ {
block * b = deque->leftblock; block * b = deque->leftblock;
int index = deque->leftindex; int index = deque->leftindex;
int err;
PyObject *item; PyObject *item;
while (b != deque->rightblock || index <= deque->rightindex) { while (b != deque->rightblock || index <= deque->rightindex) {
item = b->data[index]; item = b->data[index];
index++; index++;
if (index == BLOCKLEN && b->rightlink != NULL) { if (index == BLOCKLEN ) {
assert(b->rightlink != NULL);
b = b->rightlink; b = b->rightlink;
index = 0; index = 0;
} }
err = visit(item, arg); Py_VISIT(item);
if (err)
return err;
} }
return 0; 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