diff options
author | Christian Heimes <christian@cheimes.de> | 2007-12-02 14:31:20 +0000 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-12-02 14:31:20 +0000 |
commit | b322e41d3672c465db3aca80419689f1902c6612 (patch) | |
tree | 0a4fb14529a5f623c49b0bca97d9af5d2677c056 /Modules/resource.c | |
parent | 7d4a05a4ebffb688137ca5b5a92825a756927e7e (diff) | |
download | cpython-b322e41d3672c465db3aca80419689f1902c6612.tar.gz |
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.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Modules/resource.c b/Modules/resource.c index d38c660e77..d67fe99ffa 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); |