mirror of https://github.com/python/cpython
Convert another post-decrement while-loop to pre-decrement for consistency
and better generated code (on both GCC and CLang).
This commit is contained in:
parent
165eee214b
commit
306d6b1ea6
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue