[Patches] [ python-Patches-489066 ] Include RLIM_INFINITY constant
noreply@sourceforge.net
noreply@sourceforge.net
Sun, 24 Mar 2002 04:02:48 -0800
Patches item #489066, was opened at 2001-12-04 15:42
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=489066&group_id=5470
Category: Modules
>Group: Python 2.3
Status: Open
>Resolution: Accepted
Priority: 5
Submitted By: Eric Huss (ehuss)
>Assigned to: Neil Schemenauer (nascheme)
Summary: Include RLIM_INFINITY constant
Initial Comment:
The following is a patch to the resource module to
include the RLIM_INFINITY constant. It should handle
platforms where RLIM_INFINITY is not a LONG_LONG, but
I have no means to test that.
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-03-24 07:02
Message:
Logged In: YES
user_id=6380
Comments:
(1) RLIM_INFINITY is used unconditionally elsewhere in the
module, so the #ifdef is unnecessary.
(2) The extra #if/#endif around the closing curly is ugly.
I'd avoid this by moving the corresponding opening curly
outside the first block.
(3) resource.RLIM_INFINITY is -1 on my system too. But does
that matter? This is just a symbolic constant to be used to
set limits to infinit, and if it happens to be -1, who
cares? It's got 32 1-bits, which is what counts.
So I'd accept it.
----------------------------------------------------------------------
Comment By: Neil Schemenauer (nascheme)
Date: 2002-03-23 19:25
Message:
Logged In: YES
user_id=35752
This doesn't seem to work on my Linux machine. RLIM_INFINITY
is an unsigned long. It becomes -1L in the resource module.
I'm attaching an updated patch that uses PyModule_AddObject
and applies cleanly to the current CVS.
----------------------------------------------------------------------
Comment By: Jeremy Hylton (jhylton)
Date: 2001-12-13 15:43
Message:
Logged In: YES
user_id=31392
I'd rather see this go through a beta release where we can
verify that it works for both the LONG_LONG and
non-LONG_LONG cases.
Among other things, it looks possible (though probably
unlikely) that there are platforms that do not have long
long and do not representation rlim_t as long.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-12 00:24
Message:
Logged In: YES
user_id=6380
Jeremy, please review and apply or reject (or postpone and
lower priority).
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=489066&group_id=5470