Use unsigned division
This commit is contained in:
parent
1286d14500
commit
bc00341105
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue