From: Thomas Wouters Date: Fri, 25 Jan 2008 19:51:24 +0000 (+0000) Subject: Use the right (portable) definition of the max of a Py_ssize_t. X-Git-Tag: v2.5.2c1~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d92272e4a9b435faddba859fd37a34ce89f817a9;p=python Use the right (portable) definition of the max of a Py_ssize_t. --- diff --git a/Objects/listobject.c b/Objects/listobject.c index 10b099aecb..7c63acf1c8 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -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(); }