mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
Use unsigned division
This commit is contained in:
parent
1286d14500
commit
bc00341105
1 changed files with 1 additions and 1 deletions
|
|
@ -1482,7 +1482,7 @@ deque_sizeof(dequeobject *deque, void *unused)
|
||||||
Py_ssize_t blocks;
|
Py_ssize_t blocks;
|
||||||
|
|
||||||
res = sizeof(dequeobject);
|
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 ==
|
assert(deque->leftindex + Py_SIZE(deque) - 1 ==
|
||||||
(blocks - 1) * BLOCKLEN + deque->rightindex);
|
(blocks - 1) * BLOCKLEN + deque->rightindex);
|
||||||
res += blocks * sizeof(block);
|
res += blocks * sizeof(block);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue