summaryrefslogtreecommitdiff
path: root/Modules/resource.c
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-05-08 21:28:46 +0000
committerMark Dickinson <dickinsm@gmail.com>2009-05-08 21:28:46 +0000
commitbb6721474c08d9c941b2fb3f617cfc6956f3a302 (patch)
treece397b91b5769d1e604483fe0d86ce954c91665c /Modules/resource.c
parent37fe8bfde6a225139ac689b03a5de4ddbd49a83c (diff)
downloadcpython-git-bb6721474c08d9c941b2fb3f617cfc6956f3a302.tar.gz
Clean up some int/long detection remnants in resource module.
Diffstat (limited to 'Modules/resource.c')
-rw-r--r--Modules/resource.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/resource.c b/Modules/resource.c
index facb7d958d..22e177fe38 100644
--- a/Modules/resource.c
+++ b/Modules/resource.c
@@ -166,12 +166,10 @@ resource_setrlimit(PyObject *self, PyObject *args)
return NULL;
#else
/* The limits are probably bigger than a long */
- rl.rlim_cur = PyLong_Check(curobj) ?
- PyLong_AsLongLong(curobj) : PyLong_AsLong(curobj);
+ rl.rlim_cur = PyLong_AsLongLong(curobj);
if (rl.rlim_cur == (rlim_t)-1 && PyErr_Occurred())
return NULL;
- rl.rlim_max = PyLong_Check(maxobj) ?
- PyLong_AsLongLong(maxobj) : PyLong_AsLong(maxobj);
+ rl.rlim_max = PyLong_AsLongLong(maxobj);
if (rl.rlim_max == (rlim_t)-1 && PyErr_Occurred())
return NULL;
#endif