summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-08-02 23:40:46 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-08-02 23:40:46 (GMT)
commite3298dda6dfb5427b3beab142e563d65c1bd5e84 (patch)
treefddd9447dab67505b5bbbb356412b24930ef501e
parent8f7bdd3208e071341a1493568023ef734b53016f (diff)
downloadcpython-e3298dda6dfb5427b3beab142e563d65c1bd5e84.zip
cpython-e3298dda6dfb5427b3beab142e563d65c1bd5e84.tar.gz
cpython-e3298dda6dfb5427b3beab142e563d65c1bd5e84.tar.bz2
only add sched_param if it is initialized
-rw-r--r--Modules/posixmodule.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 918ffb6..e6d70d3 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__