Skip to content

Commit 94a83fd

Browse files
committed
Fix SF #632624, test_resource failure on alpha/64bit
Return PyLongs instead ot PyInts. On alphas, 9223372036854775807 became -1.
1 parent d631ebe commit 94a83fd

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,8 @@ Core and builtins
292292
Extension modules
293293
-----------------
294294

295+
- resource.getrlimit() now returns longs instead of ints.
296+
295297
- readline now dynamically adjusts its input/output stream if
296298
sys.stdin/stdout changes.
297299

Modules/resource.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ resource_getrlimit(PyObject *self, PyObject *args)
132132
(LONG_LONG) rl.rlim_max);
133133
}
134134
#endif
135-
return Py_BuildValue("ii", (long) rl.rlim_cur, (long) rl.rlim_max);
135+
return Py_BuildValue("ll", (long) rl.rlim_cur, (long) rl.rlim_max);
136136
}
137137

138138
static PyObject *

0 commit comments

Comments
 (0)