From 94a83fdc157a8d393bcee3321ccdb5a818a2bf78 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sat, 2 Nov 2002 17:46:24 +0000 Subject: [PATCH] Fix SF #632624, test_resource failure on alpha/64bit Return PyLongs instead ot PyInts. On alphas, 9223372036854775807 became -1. --- Misc/NEWS | 2 ++ Modules/resource.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Misc/NEWS b/Misc/NEWS index 1e833899a14..3a026df54f2 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -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. diff --git a/Modules/resource.c b/Modules/resource.c index b1dd5d1f35b..8653f038802 100644 --- a/Modules/resource.c +++ b/Modules/resource.c @@ -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 *