[Python-checkins] commit of r41806 - python/trunk/Python/modsupport.c
tim.peters
python-checkins at python.org
Sat Dec 24 07:23:41 CET 2005
Author: tim.peters
Date: Sat Dec 24 07:23:41 2005
New Revision: 41806
Modified:
python/trunk/Python/modsupport.c
Log:
do_mkvalue(), 'I' and 'k' cases: squash legitimate
compiler warnings about mixing signed and unsigned types
in comparisons.
Modified: python/trunk/Python/modsupport.c
==============================================================================
--- python/trunk/Python/modsupport.c (original)
+++ python/trunk/Python/modsupport.c Sat Dec 24 07:23:41 2005
@@ -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