Message243080
- if (dictresize(mp, Py_SIZE(seq))) {
+ if (dictresize(mp, Py_SIZE(seq) / 2 * 3)) {
If Py_SIZE(seq) is 1, dictresize argument is 0.
Why not wryte the expression as Py_SIZE(seq) * 3 / 2? It never overflows, because Py_SIZE(seq) is the size of allocated array of pointers. |
|
Date |
User |
Action |
Args |
2015-05-13 12:28:09 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, gregory.p.smith, larry, benjamin.peterson, mpm, python-dev, Matt.Mackall, josh.r, marmoute |
2015-05-13 12:28:09 | serhiy.storchaka | set | messageid: <1431520089.17.0.223198303338.issue23971@psf.upfronthosting.co.za> |
2015-05-13 12:28:09 | serhiy.storchaka | link | issue23971 messages |
2015-05-13 12:28:09 | serhiy.storchaka | create | |
|