[Patches] [ python-Patches-632624 ] fix test_resource failure on alpha/64bit

noreply@sourceforge.net noreply@sourceforge.net
Sat, 02 Nov 2002 08:29:39 -0800


Patches item #632624, was opened at 2002-11-02 11:29
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=632624&group_id=5470

Category: Core (C code)
Group: Python 2.2.x
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Nobody/Anonymous (nobody)
Summary: fix test_resource failure on alpha/64bit

Initial Comment:
resource_getrlimit() in Modules/resource.c returns a
tuple of 2 integers.  On the alpha (and probably any 64
bit machine), the value is converted from a long to a
PyInt.  The value changed from 9223372036854775807 to
-1.  The fix is very simple and thus shown inline
(Modules/resource.c:135):

-       return Py_BuildValue("ii", (long) rl.rlim_cur,
(long) rl.rlim_max);
+       return Py_BuildValue("ll", (long) rl.rlim_cur,
(long) rl.rlim_max);

I'd just check this in, but I wanted to make sure there
wouldn't be any problems changing the return value from
PyInts to PyLongs.  This seems ok to me given long
integer unification.  The test runs on both Linux/alpha
and Linux/x86.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=632624&group_id=5470