diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-12-04 22:18:27 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-12-04 22:18:27 +0000 |
commit | 456d62bc7a6734ca7dfb4b275c744739327bfe20 (patch) | |
tree | 7b4fc39ab8dbb1a5e035346cd0391fd432eeee71 /Python/modsupport.c | |
parent | fa2bc728a4b66cf93192dab05b0422874093b257 (diff) | |
download | cpython-456d62bc7a6734ca7dfb4b275c744739327bfe20.tar.gz |
Eliminate outdated usages of PyInt_GetMax.
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r-- | Python/modsupport.c | 10 |
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 |