Clean up some int/long detection remnants in resource module.
This commit is contained in:
parent
37fe8bfde6
commit
bb6721474c
|
@ -166,12 +166,10 @@ resource_setrlimit(PyObject *self, PyObject *args)
|
||||||
return NULL;
|
return NULL;
|
||||||
#else
|
#else
|
||||||
/* The limits are probably bigger than a long */
|
/* The limits are probably bigger than a long */
|
||||||
rl.rlim_cur = PyLong_Check(curobj) ?
|
rl.rlim_cur = PyLong_AsLongLong(curobj);
|
||||||
PyLong_AsLongLong(curobj) : PyLong_AsLong(curobj);
|
|
||||||
if (rl.rlim_cur == (rlim_t)-1 && PyErr_Occurred())
|
if (rl.rlim_cur == (rlim_t)-1 && PyErr_Occurred())
|
||||||
return NULL;
|
return NULL;
|
||||||
rl.rlim_max = PyLong_Check(maxobj) ?
|
rl.rlim_max = PyLong_AsLongLong(maxobj);
|
||||||
PyLong_AsLongLong(maxobj) : PyLong_AsLong(maxobj);
|
|
||||||
if (rl.rlim_max == (rlim_t)-1 && PyErr_Occurred())
|
if (rl.rlim_max == (rlim_t)-1 && PyErr_Occurred())
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue