Skip to content

Commit 5c1d13b

Browse files
committed
remove useless check
1 parent 4dbaa53 commit 5c1d13b

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

Modules/arraymodule.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,6 @@ array_resize(arrayobject *self, Py_ssize_t newsize)
268268
*/
269269

270270
size_t _new_size = (size_t)(newsize >> 4) + (Py_SIZE(self) < 8 ? 3 : 7) + newsize;
271-
// Limit over-allocation to not overflow Py_ssize_t, newsize can't ever be
272-
// larger than this anyway. Otherwise a valid resize request might be
273-
// rejected due to overallocation falling outside usable range.
274-
if (_new_size > PY_SSIZE_T_MAX) {
275-
_new_size = PY_SSIZE_T_MAX;
276-
}
277271
int itemsize = self->ob_descr->itemsize;
278272

279273
if (!arraydata_size_valid(_new_size, itemsize)) {

0 commit comments

Comments
 (0)