[Python-checkins] r42614 - python/branches/release24-maint/Python/modsupport.c

tim.peters python-checkins at python.org
Mon Feb 27 18:49:44 CET 2006


Author: tim.peters
Date: Mon Feb 27 18:49:41 2006
New Revision: 42614

Modified:
   python/branches/release24-maint/Python/modsupport.c
Log:
do_mkvalue():  Squash compiler warnings about mixing
signed and unsigned types in comparison.


Modified: python/branches/release24-maint/Python/modsupport.c
==============================================================================
--- python/branches/release24-maint/Python/modsupport.c	(original)
+++ python/branches/release24-maint/Python/modsupport.c	Mon Feb 27 18:49:41 2006
@@ -307,7 +307,7 @@
 		{
 			unsigned int n;
 			n = va_arg(*p_va, unsigned int);
-			if (n > PyInt_GetMax())
+			if (n > (unsigned long)PyInt_GetMax())
 				return PyLong_FromUnsignedLong((unsigned long)n);
 			else
 				return PyInt_FromLong(n);
@@ -320,7 +320,7 @@
 		{
 			unsigned long n;
 			n = va_arg(*p_va, unsigned long);
-			if (n > PyInt_GetMax())
+			if (n > (unsigned long)PyInt_GetMax())
 				return PyLong_FromUnsignedLong(n);
 			else
 				return PyInt_FromLong(n);


More information about the Python-checkins mailing list