only add sched_param if it is initialized

This commit is contained in:
Benjamin Peterson 2011-08-02 18:40:46 -05:00
parent 8f7bdd3208
commit e3298dda6d
1 changed files with 3 additions and 0 deletions

View File

@ -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__