From: Benjamin Peterson Date: Tue, 2 Aug 2011 23:40:46 +0000 (-0500) Subject: only add sched_param if it is initialized X-Git-Tag: v3.3.0a1~1764 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e3298dda6dfb5427b3beab142e563d65c1bd5e84;p=thirdparty%2FPython%2Fcpython.git only add sched_param if it is initialized --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 918ffb655c56..e6d70d385e6e 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -10965,8 +10965,11 @@ INITFUNC(void) Py_INCREF((PyObject*) &StatVFSResultType); PyModule_AddObject(m, "statvfs_result", (PyObject*) &StatVFSResultType); + +#if defined(HAVE_SCHED_SETPARAM) || defined(HAVE_SCHED_SETSCHEDULER) Py_INCREF(&SchedParamType); PyModule_AddObject(m, "sched_param", (PyObject *)&SchedParamType); +#endif initialized = 1; #ifdef __APPLE__