diff Python/getargs.c @ 38666:e2ba5ae4b813 legacy-trunk

Argh. "integer" is a very confusing word ;) Actually, checking for INT_MAX and INT_MIN is correct since the format code explicitly handles a C "int".
author Georg Brandl <georg@python.org>
date Thu, 08 Jun 2006 13:31:07 +0000
parents 3581d1dc4253
children 17d5671fffcc
line wrap: on
line diff
--- a/Python/getargs.c	Thu Jun 08 12:55:47 2006 +0000
+++ b/Python/getargs.c	Thu Jun 08 13:31:07 2006 +0000
@@ -624,12 +624,12 @@
 		ival = PyInt_AsLong(arg);
 		if (ival == -1 && PyErr_Occurred())
 			return converterr("integer<i>", arg, msgbuf, bufsize);
-		else if (ival > LONG_MAX) {
+		else if (ival > INT_MAX) {
 			PyErr_SetString(PyExc_OverflowError,
 				"signed integer is greater than maximum");
 			return converterr("integer<i>", arg, msgbuf, bufsize);
 		}
-		else if (ival < LONG_MIN) {
+		else if (ival < INT_MIN) {
 			PyErr_SetString(PyExc_OverflowError,
 				"signed integer is less than minimum");
 			return converterr("integer<i>", arg, msgbuf, bufsize);