diff -r 50517a4d7cce Doc/extending/newtypes.rst --- a/Doc/extending/newtypes.rst Wed Dec 10 02:50:32 2014 +0200 +++ b/Doc/extending/newtypes.rst Thu Dec 11 22:22:20 2014 +0530 @@ -1205,7 +1205,7 @@ { if (strcmp(name, "data") == 0) { - return PyInt_FromLong(obj->data); + return PyLong_FromLong(obj->data); } PyErr_Format(PyExc_AttributeError, diff -r 50517a4d7cce Include/longobject.h --- a/Include/longobject.h Wed Dec 10 02:50:32 2014 +0200 +++ b/Include/longobject.h Thu Dec 11 22:22:20 2014 +0530 @@ -31,8 +31,7 @@ #endif PyAPI_FUNC(PyObject *) PyLong_GetInfo(void); -/* It may be useful in the future. I've added it in the PyInt -> PyLong - cleanup to keep the extra information. [CH] */ +/* It may be useful in the future. [CH] */ #define PyLong_AS_LONG(op) PyLong_AsLong(op) /* Issue #1983: pid_t can be longer than a C long on some systems */ diff -r 50517a4d7cce Lib/test/test_getargs2.py --- a/Lib/test/test_getargs2.py Wed Dec 10 02:50:32 2014 +0200 +++ b/Lib/test/test_getargs2.py Thu Dec 11 22:22:20 2014 +0530 @@ -34,8 +34,8 @@ # > ** Changed from previous "range-and-a-half" to "none"; the # > range-and-a-half checking wasn't particularly useful. # -# Plus a C API or two, e.g. PyInt_AsLongMask() -> -# unsigned long and PyInt_AsLongLongMask() -> unsigned +# Plus a C API or two, e.g. PyLong_AsUnsignedLongMask() -> +# unsigned long and PyLong_AsUnsignedLongLongMask() -> unsigned # long long (if that exists). LARGE = 0x7FFFFFFF diff -r 50517a4d7cce Modules/_json.c --- a/Modules/_json.c Wed Dec 10 02:50:32 2014 +0200 +++ b/Modules/_json.c Thu Dec 11 22:22:20 2014 +0530 @@ -810,7 +810,7 @@ the number. Returns a new PyObject representation of that number: - PyInt, PyLong, or PyFloat. + PyLong, or PyFloat. May return other types if parse_int or parse_float are set */ void *str; diff -r 50517a4d7cce Modules/fcntlmodule.c --- a/Modules/fcntlmodule.c Wed Dec 10 02:50:32 2014 +0200 +++ b/Modules/fcntlmodule.c Thu Dec 11 22:22:20 2014 +0530 @@ -100,8 +100,8 @@ int fd; /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I' format for the 'code' parameter because Python turns 0x8000000 - into either a large positive number (PyLong or PyInt on 64-bit - platforms) or a negative number on others (32-bit PyInt) + into either a large positive number (PyLong on 64-bit + platforms) or a negative number on others (32-bit PyLong) whereas the system expects it to be a 32bit bit field value regardless of it being passed as an int or unsigned long on various platforms. See the termios.TIOCSWINSZ constant across diff -r 50517a4d7cce Modules/itertoolsmodule.c --- a/Modules/itertoolsmodule.c Wed Dec 10 02:50:32 2014 +0200 +++ b/Modules/itertoolsmodule.c Thu Dec 11 22:22:20 2014 +0530 @@ -3866,7 +3866,7 @@ fast_mode: when cnt an integer < PY_SSIZE_T_MAX and no step is specified. - assert(cnt != PY_SSIZE_T_MAX && long_cnt == NULL && long_step==PyInt(1)); + assert(cnt != PY_SSIZE_T_MAX && long_cnt == NULL && long_step==PyLong(1)); Advances with: cnt += 1 When count hits Y_SSIZE_T_MAX, switch to slow_mode. diff -r 50517a4d7cce Python/ceval.c --- a/Python/ceval.c Wed Dec 10 02:50:32 2014 +0200 +++ b/Python/ceval.c Thu Dec 11 22:22:20 2014 +0530 @@ -4565,7 +4565,7 @@ return result; } -/* Extract a slice index from a PyInt or PyLong or an object with the +/* Extract a slice index from a PyLong or an object with the nb_index slot defined, and store in *pi. Silently reduce values larger than PY_SSIZE_T_MAX to PY_SSIZE_T_MAX, and silently boost values less than -PY_SSIZE_T_MAX-1 to -PY_SSIZE_T_MAX-1.