]> granicus.if.org Git - python/commitdiff
Use the right (portable) definition of the max of a Py_ssize_t.
authorThomas Wouters <thomas@python.org>
Fri, 25 Jan 2008 19:51:24 +0000 (19:51 +0000)
committerThomas Wouters <thomas@python.org>
Fri, 25 Jan 2008 19:51:24 +0000 (19:51 +0000)
Objects/listobject.c

index 10b099aecbe2d92dd71d030028fd5d3e2b9e0495..7c63acf1c8a051dc1c67c16ba1f9e792faf13607 100644 (file)
@@ -672,7 +672,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();
        }