Commit 306d6b1e authored by Raymond Hettinger's avatar Raymond Hettinger

Convert another post-decrement while-loop to pre-decrement for consistency

and better generated code (on both GCC and CLang).
parent 165eee21
......@@ -895,7 +895,8 @@ deque_reverse(dequeobject *deque, PyObject *unused)
Py_ssize_t n = Py_SIZE(deque) >> 1;
PyObject *tmp;
while (n-- > 0) {
n++;
while (--n) {
/* Validate that pointers haven't met in the middle */
assert(leftblock != rightblock || leftindex < rightindex);
CHECK_NOT_END(leftblock);
......
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