do_mkvalue(), 'I' and 'k' cases: squash legitimate

compiler warnings about mixing signed and unsigned types
in comparisons.
This commit is contained in:
Tim Peters 2005-12-24 06:23:41 +00:00
parent c3d12ac88c
commit 35c3f4f249
1 changed files with 2 additions and 2 deletions

View File

@ -307,7 +307,7 @@ do_mkvalue(const char **p_format, va_list *p_va)
{ {
unsigned int n; unsigned int n;
n = va_arg(*p_va, unsigned int); n = va_arg(*p_va, unsigned int);
if (n > PyInt_GetMax()) if (n > (unsigned long)PyInt_GetMax())
return PyLong_FromUnsignedLong((unsigned long)n); return PyLong_FromUnsignedLong((unsigned long)n);
else else
return PyInt_FromLong(n); return PyInt_FromLong(n);
@ -320,7 +320,7 @@ do_mkvalue(const char **p_format, va_list *p_va)
{ {
unsigned long n; unsigned long n;
n = va_arg(*p_va, unsigned long); n = va_arg(*p_va, unsigned long);
if (n > PyInt_GetMax()) if (n > (unsigned long)PyInt_GetMax())
return PyLong_FromUnsignedLong(n); return PyLong_FromUnsignedLong(n);
else else
return PyInt_FromLong(n); return PyInt_FromLong(n);