summaryrefslogtreecommitdiff
path: root/Objects/listobject.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-09-07 09:26:18 -0700
committerBenjamin Peterson <benjamin@python.org>2016-09-07 09:26:18 -0700
commit2f8bfef1587b3e8f43c0ce7cd9546137c5b56782 (patch)
tree44becf9ee303c3cd1e8977fbda8cbbe42237258a /Objects/listobject.c
parentc75abff53375bbd9f1536de4069854cea4933c42 (diff)
downloadcpython-git-2f8bfef1587b3e8f43c0ce7cd9546137c5b56782.tar.gz
replace PY_SIZE_MAX with SIZE_MAX
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r--Objects/listobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 90bbf2a5d0..dcd7b5efe5 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -49,7 +49,7 @@ list_resize(PyListObject *self, Py_ssize_t newsize)
new_allocated = (newsize >> 3) + (newsize < 9 ? 3 : 6);
/* check for integer overflow */
- if (new_allocated > PY_SIZE_MAX - newsize) {
+ if (new_allocated > SIZE_MAX - newsize) {
PyErr_NoMemory();
return -1;
} else {
@@ -59,7 +59,7 @@ list_resize(PyListObject *self, Py_ssize_t newsize)
if (newsize == 0)
new_allocated = 0;
items = self->ob_item;
- if (new_allocated <= (PY_SIZE_MAX / sizeof(PyObject *)))
+ if (new_allocated <= (SIZE_MAX / sizeof(PyObject *)))
PyMem_RESIZE(items, PyObject *, new_allocated);
else
items = NULL;