Kaydet (Commit) 39b35431 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

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.
üst 4c5475d1
......@@ -159,6 +159,15 @@ class OSSAudioDevTests(unittest.TestCase):
dsp.close()
self.assertTrue(dsp.closed)
def test_mixer_methods(self):
# Issue #8139: ossaudiodev didn't initialize its types properly,
# therefore some methods were unavailable.
mixer = ossaudiodev.openmixer()
try:
self.assertGreaterEqual(mixer.fileno(), 0)
finally:
mixer.close()
def test_main():
try:
......
......@@ -372,6 +372,7 @@ Ben Jackson
David Jacobs
Kevin Jacobs
Kjetil Jacobsen
Bertrand Janin
Geert Jansen
Jack Jansen
Bill Janssen
......
......@@ -287,6 +287,10 @@ C-API
Library
-------
- 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.
- Issue #7512: shutil.copystat() could raise an OSError when the filesystem
didn't support chflags() (for example ZFS under FreeBSD). The error is
now silenced.
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment