Fix SF #632624, test_resource failure on alpha/64bit

Return PyLongs instead ot PyInts.
On alphas, 9223372036854775807 became -1.
This commit is contained in:
Neal Norwitz 2002-11-02 17:46:24 +00:00
parent d631ebe20b
commit 94a83fdc15
2 changed files with 3 additions and 1 deletions

View File

@ -292,6 +292,8 @@ Core and builtins
Extension modules
-----------------
- resource.getrlimit() now returns longs instead of ints.
- readline now dynamically adjusts its input/output stream if
sys.stdin/stdout changes.

View File

@ -132,7 +132,7 @@ resource_getrlimit(PyObject *self, PyObject *args)
(LONG_LONG) rl.rlim_max);
}
#endif
return Py_BuildValue("ii", (long) rl.rlim_cur, (long) rl.rlim_max);
return Py_BuildValue("ll", (long) rl.rlim_cur, (long) rl.rlim_max);
}
static PyObject *