mirror of https://github.com/python/cpython
Merged revisions 79317 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r79317 | antoine.pitrou | 2010-03-23 01:25:54 +0100 (mar., 23 mars 2010) | 5 lines 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. ........
This commit is contained in:
parent
9f274b1fab
commit
9004eddf41
|
@ -159,6 +159,15 @@ class OSSAudioDevTests(unittest.TestCase):
|
||||||
dsp.close()
|
dsp.close()
|
||||||
self.assertTrue(dsp.closed)
|
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():
|
def test_main():
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -359,6 +359,7 @@ Ben Jackson
|
||||||
David Jacobs
|
David Jacobs
|
||||||
Kevin Jacobs
|
Kevin Jacobs
|
||||||
Kjetil Jacobsen
|
Kjetil Jacobsen
|
||||||
|
Bertrand Janin
|
||||||
Geert Jansen
|
Geert Jansen
|
||||||
Jack Jansen
|
Jack Jansen
|
||||||
Bill Janssen
|
Bill Janssen
|
||||||
|
|
|
@ -17,6 +17,10 @@ Core and Builtins
|
||||||
Library
|
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
|
- Issue #7512: shutil.copystat() could raise an OSError when the filesystem
|
||||||
didn't support chflags() (for example ZFS under FreeBSD). The error is
|
didn't support chflags() (for example ZFS under FreeBSD). The error is
|
||||||
now silenced.
|
now silenced.
|
||||||
|
|
|
@ -986,11 +986,17 @@ static struct PyModuleDef ossaudiodevmodule = {
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
PyObject*
|
PyMODINIT_FUNC
|
||||||
PyInit_ossaudiodev(void)
|
PyInit_ossaudiodev(void)
|
||||||
{
|
{
|
||||||
PyObject *m;
|
PyObject *m;
|
||||||
|
|
||||||
|
if (PyType_Ready(&OSSAudioType) < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (PyType_Ready(&OSSMixerType) < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
m = PyModule_Create(&ossaudiodevmodule);
|
m = PyModule_Create(&ossaudiodevmodule);
|
||||||
if (m == NULL)
|
if (m == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue