summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-12-04 22:18:27 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2007-12-04 22:18:27 (GMT)
commit327858ef2c4512937a1333212a3b46a62c18ccc3 (patch)
tree62c580b25d31dc63acee426a524754b1743c191b /Python
parentd1a1d1ed802187cd1a9a8a95ac5d758c7acffee6 (diff)
downloadcpython-327858ef2c4512937a1333212a3b46a62c18ccc3.zip
cpython-327858ef2c4512937a1333212a3b46a62c18ccc3.tar.gz
cpython-327858ef2c4512937a1333212a3b46a62c18ccc3.tar.bz2
Eliminate outdated usages of PyInt_GetMax.
Diffstat (limited to 'Python')
-rw-r--r--Python/modsupport.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c
index aca57a4..68e1fa4 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -316,10 +316,7 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags)
{
unsigned int n;
n = va_arg(*p_va, unsigned int);
- if (n > (unsigned long)PyInt_GetMax())
- return PyLong_FromUnsignedLong((unsigned long)n);
- else
- return PyLong_FromLong(n);
+ return PyLong_FromUnsignedLong(n);
}
case 'n':
@@ -334,10 +331,7 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags)
{
unsigned long n;
n = va_arg(*p_va, unsigned long);
- if (n > (unsigned long)PyInt_GetMax())
- return PyLong_FromUnsignedLong(n);
- else
- return PyLong_FromLong(n);
+ return PyLong_FromUnsignedLong(n);
}
#ifdef HAVE_LONG_LONG