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

noreply@sourceforge.net noreply@sourceforge.net
Sat, 02 Nov 2002 09:34:47 -0800


Patches item #632624, was opened at 2002-11-02 17: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: Accepted
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
>Assigned to: Neal Norwitz (nnorwitz)
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.

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

>Comment By: Martin v. L÷wis (loewis)
Date: 2002-11-02 18:34

Message:
Logged In: YES 
user_id=21627

I think this is ok, given that resource isn't that much used
in the first place. Please make sure to add a comment in NEWS.

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

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