diff options
author | Raymond Hettinger <python@rcn.com> | 2015-10-14 23:33:23 -0700 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-10-14 23:33:23 -0700 |
commit | 680c22a1a5355696aeccbdffbbc973fef1d51ece (patch) | |
tree | 5a1fa9292d87efdcc0b3d75a611854cb9a2f53fb /Modules/_collectionsmodule.c | |
parent | 44fffba53fdac253b578635ae13155353efe155f (diff) | |
download | cpython-680c22a1a5355696aeccbdffbbc973fef1d51ece.tar.gz |
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 06f85e94ce..bc225a5b4c 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); |