summaryrefslogtreecommitdiffstats
path: root/Modules/resource.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-12-02 14:31:20 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-12-02 14:31:20 (GMT)
commit217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2 (patch)
tree4737b4a91359c94953623ab9ee297e9a90f319e4 /Modules/resource.c
parent1a3284ed69d545e4ef59869998cb8c29233a45fa (diff)
downloadcpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.zip
cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.gz
cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.bz2
Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h
Diffstat (limited to 'Modules/resource.c')
-rw-r--r--Modules/resource.c38
1 files changed, 19 insertions, 19 deletions
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 @@ resource_getrusage(PyObject *self, PyObject *args)
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 @@ resource_setrlimit(PyObject *self, PyObject *args)
}
#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 @@ initresource(void)
} else
#endif
{
- v = PyInt_FromLong((long) RLIM_INFINITY);
+ v = PyLong_FromLong((long) RLIM_INFINITY);
}
if (v) {
PyModule_AddObject(m, "RLIM_INFINITY", v);