Use unsigned division

This commit is contained in:
Raymond Hettinger 2015-10-14 23:33:23 -07:00
parent 1286d14500
commit bc00341105
1 changed files with 1 additions and 1 deletions

View File

@ -1482,7 +1482,7 @@ deque_sizeof(dequeobject *deque, void *unused)
Py_ssize_t blocks;
res = sizeof(dequeobject);
blocks = (deque->leftindex + Py_SIZE(deque) + BLOCKLEN - 1) / BLOCKLEN;
blocks = (size_t)(deque->leftindex + Py_SIZE(deque) + BLOCKLEN - 1) / BLOCKLEN;
assert(deque->leftindex + Py_SIZE(deque) - 1 ==
(blocks - 1) * BLOCKLEN + deque->rightindex);
res += blocks * sizeof(block);