Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h
diff --git a/Modules/resource.c b/Modules/resource.c
index d38c660..d67fe99 100644
--- a/Modules/resource.c
+++ b/Modules/resource.c
@@ -86,20 +86,20 @@
PyFloat_FromDouble(doubletime(ru.ru_utime)));
PyStructSequence_SET_ITEM(result, 1,
PyFloat_FromDouble(doubletime(ru.ru_stime)));
- PyStructSequence_SET_ITEM(result, 2, PyInt_FromLong(ru.ru_maxrss));
- PyStructSequence_SET_ITEM(result, 3, PyInt_FromLong(ru.ru_ixrss));
- PyStructSequence_SET_ITEM(result, 4, PyInt_FromLong(ru.ru_idrss));
- PyStructSequence_SET_ITEM(result, 5, PyInt_FromLong(ru.ru_isrss));
- PyStructSequence_SET_ITEM(result, 6, PyInt_FromLong(ru.ru_minflt));
- PyStructSequence_SET_ITEM(result, 7, PyInt_FromLong(ru.ru_majflt));
- PyStructSequence_SET_ITEM(result, 8, PyInt_FromLong(ru.ru_nswap));
- PyStructSequence_SET_ITEM(result, 9, PyInt_FromLong(ru.ru_inblock));
- PyStructSequence_SET_ITEM(result, 10, PyInt_FromLong(ru.ru_oublock));
- PyStructSequence_SET_ITEM(result, 11, PyInt_FromLong(ru.ru_msgsnd));
- PyStructSequence_SET_ITEM(result, 12, PyInt_FromLong(ru.ru_msgrcv));
- PyStructSequence_SET_ITEM(result, 13, PyInt_FromLong(ru.ru_nsignals));
- PyStructSequence_SET_ITEM(result, 14, PyInt_FromLong(ru.ru_nvcsw));
- PyStructSequence_SET_ITEM(result, 15, PyInt_FromLong(ru.ru_nivcsw));
+ PyStructSequence_SET_ITEM(result, 2, PyLong_FromLong(ru.ru_maxrss));
+ PyStructSequence_SET_ITEM(result, 3, PyLong_FromLong(ru.ru_ixrss));
+ PyStructSequence_SET_ITEM(result, 4, PyLong_FromLong(ru.ru_idrss));
+ PyStructSequence_SET_ITEM(result, 5, PyLong_FromLong(ru.ru_isrss));
+ PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(ru.ru_minflt));
+ PyStructSequence_SET_ITEM(result, 7, PyLong_FromLong(ru.ru_majflt));
+ PyStructSequence_SET_ITEM(result, 8, PyLong_FromLong(ru.ru_nswap));
+ PyStructSequence_SET_ITEM(result, 9, PyLong_FromLong(ru.ru_inblock));
+ PyStructSequence_SET_ITEM(result, 10, PyLong_FromLong(ru.ru_oublock));
+ PyStructSequence_SET_ITEM(result, 11, PyLong_FromLong(ru.ru_msgsnd));
+ PyStructSequence_SET_ITEM(result, 12, PyLong_FromLong(ru.ru_msgrcv));
+ PyStructSequence_SET_ITEM(result, 13, PyLong_FromLong(ru.ru_nsignals));
+ PyStructSequence_SET_ITEM(result, 14, PyLong_FromLong(ru.ru_nvcsw));
+ PyStructSequence_SET_ITEM(result, 15, PyLong_FromLong(ru.ru_nivcsw));
if (PyErr_Occurred()) {
Py_DECREF(result);
@@ -158,20 +158,20 @@
}
#if !defined(HAVE_LARGEFILE_SUPPORT)
- rl.rlim_cur = PyInt_AsLong(curobj);
+ rl.rlim_cur = PyLong_AsLong(curobj);
if (rl.rlim_cur == -1 && PyErr_Occurred())
return NULL;
- rl.rlim_max = PyInt_AsLong(maxobj);
+ rl.rlim_max = PyLong_AsLong(maxobj);
if (rl.rlim_max == -1 && PyErr_Occurred())
return NULL;
#else
/* The limits are probably bigger than a long */
rl.rlim_cur = PyLong_Check(curobj) ?
- PyLong_AsLongLong(curobj) : PyInt_AsLong(curobj);
+ PyLong_AsLongLong(curobj) : PyLong_AsLong(curobj);
if (rl.rlim_cur == -1 && PyErr_Occurred())
return NULL;
rl.rlim_max = PyLong_Check(maxobj) ?
- PyLong_AsLongLong(maxobj) : PyInt_AsLong(maxobj);
+ PyLong_AsLongLong(maxobj) : PyLong_AsLong(maxobj);
if (rl.rlim_max == -1 && PyErr_Occurred())
return NULL;
#endif
@@ -320,7 +320,7 @@
} else
#endif
{
- v = PyInt_FromLong((long) RLIM_INFINITY);
+ v = PyLong_FromLong((long) RLIM_INFINITY);
}
if (v) {
PyModule_AddObject(m, "RLIM_INFINITY", v);