summaryrefslogtreecommitdiff
path: root/Python/modsupport.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-12-04 22:18:27 +0000
committerMartin v. Löwis <martin@v.loewis.de>2007-12-04 22:18:27 +0000
commit456d62bc7a6734ca7dfb4b275c744739327bfe20 (patch)
tree7b4fc39ab8dbb1a5e035346cd0391fd432eeee71 /Python/modsupport.c
parentfa2bc728a4b66cf93192dab05b0422874093b257 (diff)
downloadcpython-456d62bc7a6734ca7dfb4b275c744739327bfe20.tar.gz
Eliminate outdated usages of PyInt_GetMax.
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r--Python/modsupport.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c
index aca57a4b00..68e1fa4a6a 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