diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:08:17 +0100 |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:08:17 +0100 |
commit | c6180bb73c8c7c7f9d8ea9816487b710597b6fc1 (patch) | |
tree | fb4a5c18886537b4b7df46ed3b2aa579747ff507 /Modules/resource.c | |
parent | 5e0114a832a903518c4af6983161c0c2a8942a24 (diff) | |
parent | 819a21a3a4aac38f32e1ba4f68bcef45591fa3f0 (diff) | |
download | cpython-c6180bb73c8c7c7f9d8ea9816487b710597b6fc1.tar.gz |
Merge issue #26355 fix from Python 3.5
Diffstat (limited to 'Modules/resource.c')
-rw-r--r-- | Modules/resource.c | 10 |
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); } |