]> granicus.if.org Git - python/commitdiff
Clean up some int/long detection remnants in resource module.
authorMark Dickinson <dickinsm@gmail.com>
Fri, 8 May 2009 21:28:46 +0000 (21:28 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Fri, 8 May 2009 21:28:46 +0000 (21:28 +0000)
Modules/resource.c

index facb7d958deb34e3726b7879cd1f5f701511e784..22e177fe38fe7433ec123e6c571f6732ee1c8f4b 100644 (file)
@@ -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