[Python-3000-checkins] r59337 - in python/branches/py3k: Doc/c-api/utilities.rst Python/modsupport.c
martin.v.loewis
python-3000-checkins at python.org
Tue Dec 4 23:18:27 CET 2007
Author: martin.v.loewis
Date: Tue Dec 4 23:18:27 2007
New Revision: 59337
Modified:
python/branches/py3k/Doc/c-api/utilities.rst
python/branches/py3k/Python/modsupport.c
Log:
Eliminate outdated usages of PyInt_GetMax.
Modified: python/branches/py3k/Doc/c-api/utilities.rst
==============================================================================
--- python/branches/py3k/Doc/c-api/utilities.rst (original)
+++ python/branches/py3k/Doc/c-api/utilities.rst Tue Dec 4 23:18:27 2007
@@ -901,12 +901,10 @@
Convert a C :ctype:`unsigned short int` to a Python integer object.
``I`` (integer/long) [unsigned int]
- Convert a C :ctype:`unsigned int` to a Python integer object or a Python long
- integer object, if it is larger than ``sys.maxint``.
+ Convert a C :ctype:`unsigned int` to a Python long integer object.
``k`` (integer/long) [unsigned long]
- Convert a C :ctype:`unsigned long` to a Python integer object or a Python long
- integer object, if it is larger than ``sys.maxint``.
+ Convert a C :ctype:`unsigned long` to a Python long integer object.
``L`` (long) [PY_LONG_LONG]
Convert a C :ctype:`long long` to a Python integer object. Only available
Modified: python/branches/py3k/Python/modsupport.c
==============================================================================
--- python/branches/py3k/Python/modsupport.c (original)
+++ python/branches/py3k/Python/modsupport.c Tue Dec 4 23:18:27 2007
@@ -316,10 +316,7 @@
{
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 @@
{
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
More information about the Python-3000-checkins
mailing list