summaryrefslogtreecommitdiff
path: root/Modules/resource.c
diff options
context:
space:
mode:
authorMariatta Wijaya <mariatta.wijaya@gmail.com>2017-02-06 20:16:58 -0800
committerMariatta Wijaya <mariatta.wijaya@gmail.com>2017-02-06 20:16:58 -0800
commitda79bcf8ac7ae72218ab023e1ed54390bc1a3a27 (patch)
tree74845e2dbd9521d9748b9c32f1922f4123083bf3 /Modules/resource.c
parente3c7e835bdfc97750eb9b7fc0ad2493108c2d438 (diff)
parent1fe806ac56f8b83694d24ab604eb695d00bc8497 (diff)
downloadcpython-da79bcf8ac7ae72218ab023e1ed54390bc1a3a27.tar.gz
Issue #29371: merge with 3.5
Diffstat (limited to 'Modules/resource.c')
-rw-r--r--Modules/resource.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/Modules/resource.c b/Modules/resource.c
index 970ee84f8e..113ad5c3d0 100644
--- a/Modules/resource.c
+++ b/Modules/resource.c
@@ -152,13 +152,11 @@ error:
static PyObject*
rlimit2py(struct rlimit rl)
{
-#if defined(HAVE_LONG_LONG)
if (sizeof(rl.rlim_cur) > sizeof(long)) {
return Py_BuildValue("LL",
- (PY_LONG_LONG) rl.rlim_cur,
- (PY_LONG_LONG) rl.rlim_max);
+ (long long) rl.rlim_cur,
+ (long long) rl.rlim_max);
}
-#endif
return Py_BuildValue("ll", (long) rl.rlim_cur, (long) rl.rlim_max);
}
@@ -436,11 +434,9 @@ PyInit_resource(void)
PyModule_AddIntMacro(m, RLIMIT_NPTS);
#endif
-#if defined(HAVE_LONG_LONG)
if (sizeof(RLIM_INFINITY) > sizeof(long)) {
- v = PyLong_FromLongLong((PY_LONG_LONG) RLIM_INFINITY);
+ v = PyLong_FromLongLong((long long) RLIM_INFINITY);
} else
-#endif
{
v = PyLong_FromLong((long) RLIM_INFINITY);
}