[Python-checkins] r46746 - in python/trunk: Misc/NEWS Python/getargs.c

georg.brandl python-checkins at python.org
Thu Jun 8 15:31:08 CEST 2006


Author: georg.brandl
Date: Thu Jun  8 15:31:07 2006
New Revision: 46746

Modified:
   python/trunk/Misc/NEWS
   python/trunk/Python/getargs.c
Log:
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".


Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Thu Jun  8 15:31:07 2006
@@ -213,9 +213,6 @@
 Core and builtins
 -----------------
 
-- Bug #1502750: Check bounds integer arguments correctly on 64-bit
-  platforms.
-
 - Bug #1465834: 'bdist_wininst preinstall script support' was fixed
   by converting these apis from macros into exported functions again:
 

Modified: python/trunk/Python/getargs.c
==============================================================================
--- python/trunk/Python/getargs.c	(original)
+++ python/trunk/Python/getargs.c	Thu Jun  8 15:31:07 2006
@@ -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);


More information about the Python-checkins mailing list