diff Python/bltinmodule.c @ 37673:606818c33e50 legacy-trunk

Replace INT_MAX with PY_SSIZE_T_MAX.
author Martin v. Löwis <martin@v.loewis.de>
date Thu, 13 Apr 2006 07:52:27 +0000
parents ea9a03b8b9f6
children c9202f1c56c2
line wrap: on
line diff
--- a/Python/bltinmodule.c	Thu Apr 13 07:37:25 2006 +0000
+++ b/Python/bltinmodule.c	Thu Apr 13 07:52:27 2006 +0000
@@ -1746,14 +1746,13 @@
 		}
 		else { /* strip trailing '\n' */
 			size_t len = strlen(s);
-			if (len > INT_MAX) {
+			if (len > PY_SSIZE_T_MAX) {
 				PyErr_SetString(PyExc_OverflowError,
 						"[raw_]input: input too long");
 				result = NULL;
 			}
 			else {
-				result = PyString_FromStringAndSize(s,
-								(int)(len-1));
+				result = PyString_FromStringAndSize(s, len-1);
 			}
 		}
 		PyMem_FREE(s);