diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-09-07 16:26:18 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-09-07 16:26:18 (GMT) |
commit | 2f8bfef1587b3e8f43c0ce7cd9546137c5b56782 (patch) | |
tree | 44becf9ee303c3cd1e8977fbda8cbbe42237258a /Objects/listobject.c | |
parent | c75abff53375bbd9f1536de4069854cea4933c42 (diff) | |
download | cpython-2f8bfef1587b3e8f43c0ce7cd9546137c5b56782.zip cpython-2f8bfef1587b3e8f43c0ce7cd9546137c5b56782.tar.gz cpython-2f8bfef1587b3e8f43c0ce7cd9546137c5b56782.tar.bz2 |
replace PY_SIZE_MAX with SIZE_MAX
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r-- | Objects/listobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c index 90bbf2a..dcd7b5e 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; |