summaryrefslogtreecommitdiffstats
path: root/Modules/ossaudiodev.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-03-23 00:25:54 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-03-23 00:25:54 (GMT)
commit39b3543174b53f907e629df830b192aa77455740 (patch)
treee849f18fa012b19f70d1e458fecfb427a2d1d163 /Modules/ossaudiodev.c
parent4c5475d1967abc63e9f611fbc26e82a2b8e2b9e6 (diff)
downloadcpython-39b3543174b53f907e629df830b192aa77455740.zip
cpython-39b3543174b53f907e629df830b192aa77455740.tar.gz
cpython-39b3543174b53f907e629df830b192aa77455740.tar.bz2
Issue #8139: ossaudiodev didn't initialize its types properly, therefore
some methods (such as oss_mixer_device.fileno()) were not available. Initial patch by Bertrand Janin.
Diffstat (limited to 'Modules/ossaudiodev.c')
-rw-r--r--Modules/ossaudiodev.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c
index 7686902..6654d71 100644
--- a/Modules/ossaudiodev.c
+++ b/Modules/ossaudiodev.c
@@ -986,11 +986,17 @@ static struct PyModuleDef ossaudiodevmodule = {
NULL
};
-PyObject*
+PyMODINIT_FUNC
PyInit_ossaudiodev(void)
{
PyObject *m;
+ if (PyType_Ready(&OSSAudioType) < 0)
+ return NULL;
+
+ if (PyType_Ready(&OSSMixerType) < 0)
+ return NULL;
+
m = PyModule_Create(&ossaudiodevmodule);
if (m == NULL)
return NULL;