From: Raymond Hettinger Date: Thu, 15 Jul 2004 21:32:18 +0000 (+0000) Subject: Apply VISIT macro. X-Git-Tag: v2.4a2~239 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=67115a2b0206b9c9352dc5bed42d93bf38097073;p=thirdparty%2FPython%2Fcpython.git Apply VISIT macro. --- diff --git a/Modules/collectionsmodule.c b/Modules/collectionsmodule.c index c72c7a6d06c5..9b8a091a04c8 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; }