This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Include RLIM_INFINITY constant
Type: Stage:
Components: Extension Modules Versions: Python 2.3
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: nascheme Nosy List: ehuss, gvanrossum, jhylton, nascheme
Priority: normal Keywords: patch

Created on 2001-12-04 20:42 by ehuss, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
resource.patch ehuss, 2001-12-04 20:42 patch to include RLIM_INFINITY
rlim_inf.diff nascheme, 2002-03-24 00:25 Updated patch by nascheme
rlim_inf-2.diff gvanrossum, 2002-03-24 12:02 Guido's version, fewer #if[def]s
Messages (6)
msg38306 - (view) Author: Eric Huss (ehuss) Date: 2001-12-04 20:42
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.
msg38307 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-12-12 05:24
Logged In: YES 
user_id=6380

Jeremy, please review and apply or reject (or postpone and
lower priority).
msg38308 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2001-12-13 20:43
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.
msg38309 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2002-03-24 00:25
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.
msg38310 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-03-24 12:02
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.
msg38311 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2002-03-24 22:28
Logged In: YES 
user_id=35752

Checked in as resource.c 2.23.
History
Date User Action Args
2022-04-10 16:04:43adminsetgithub: 35663
2001-12-04 20:42:18ehusscreate