Commits

Martin von Löwis  committed af86b89

Eliminate outdated usages of PyInt_GetMax.

  • Participants
  • Parent commits 81e0c0e

Comments (0)

Files changed (2)

File Doc/c-api/utilities.rst

       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

File Python/modsupport.c

 		{
 			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':
 		{
 			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