diff options
author | Raymond Hettinger <python@rcn.com> | 2015-10-15 06:33:23 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-10-15 06:33:23 (GMT) |
commit | bc00341105afed2255ecd139ca6ca381a482b1f9 (patch) | |
tree | 7a9d3bd41925d8d1d75a9c1a2d75a30740206a65 /Modules/_collectionsmodule.c | |
parent | 1286d14500e0cf30e900ecf0b597ee1c308e0dfe (diff) | |
download | cpython-bc00341105afed2255ecd139ca6ca381a482b1f9.zip cpython-bc00341105afed2255ecd139ca6ca381a482b1f9.tar.gz cpython-bc00341105afed2255ecd139ca6ca381a482b1f9.tar.bz2 |
Use unsigned division
Diffstat (limited to 'Modules/_collectionsmodule.c')
-rw-r--r-- | Modules/_collectionsmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 06f85e9..bc225a5 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -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); |