]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use the right (portable) definition of the max of a Py_ssize_t.
authorThomas Wouters <thomas@python.org>
Fri, 25 Jan 2008 21:09:34 +0000 (21:09 +0000)
committerThomas Wouters <thomas@python.org>
Fri, 25 Jan 2008 21:09:34 +0000 (21:09 +0000)
Objects/listobject.c

index 86110cb2146c0465c710d95c466bac5fbc2c671f..78e8da4b3de0502ba007f00dc58514ead4b92110 100644 (file)
@@ -684,7 +684,7 @@ list_inplace_repeat(PyListObject *self, Py_ssize_t n)
                return (PyObject *)self;
        }
 
-       if (size > SSIZE_MAX / n) {
+       if (size > PY_SSIZE_T_MAX / n) {
                return PyErr_NoMemory();
        }