diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-11-17 16:19:35 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-11-17 16:19:35 (GMT) |
commit | b6d4ee536174f2d467c195904c140025109242e7 (patch) | |
tree | 1d75538a1c10061fd61353e0da779e5573fc141e /Modules | |
parent | dc817b229c972b2a881d08834a0612232dac7415 (diff) | |
download | cpython-b6d4ee536174f2d467c195904c140025109242e7.zip cpython-b6d4ee536174f2d467c195904c140025109242e7.tar.gz cpython-b6d4ee536174f2d467c195904c140025109242e7.tar.bz2 |
Issue #10440: Support RUSAGE_THREAD as a constant in the resource module.
Patch by Robert Collins.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/resource.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/resource.c b/Modules/resource.c index 6d8bd57..450f08c 100644 --- a/Modules/resource.c +++ b/Modules/resource.c @@ -325,6 +325,10 @@ PyInit_resource(void) PyModule_AddIntConstant(m, "RUSAGE_BOTH", RUSAGE_BOTH); #endif +#ifdef RUSAGE_THREAD + PyModule_AddIntConstant(m, "RUSAGE_THREAD", RUSAGE_THREAD); +#endif + #if defined(HAVE_LONG_LONG) if (sizeof(RLIM_INFINITY) > sizeof(long)) { v = PyLong_FromLongLong((PY_LONG_LONG) RLIM_INFINITY); |