summaryrefslogtreecommitdiffstats
path: root/Modules/ossaudiodev.c
Commit message (Collapse)AuthorAgeFilesLines
* gh-104773: PEP 594: Remove the ossaudiodev module (#104862)Victor Stinner2023-05-241-1399/+0
| | | | | * Remove ossaudiodev extension in configure.ac and regenerate the configure script. * Remove ossaudiodev in Modules/Setup and Modules/Setup.stdlib.in.
* bpo-15999: Accept arbitrary values for boolean parameters. (#15609)Serhiy Storchaka2022-12-031-1/+1
| | | builtins and extension module functions and methods that expect boolean values for parameters now accept any Python object rather than just a bool or int type. This is more consistent with how native Python code itself behaves.
* gh-99300: Use Py_NewRef() in Modules/ directory (#99469)Victor Stinner2022-11-141-6/+3
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Modules/ directory.
* GH-90699: Remove remaining `_Py_IDENTIFIER` stdlib usage (GH-99067)Kumar Aditya2022-11-071-4/+1
|
* gh-91734: Fix ossaudio support on Solaris (GH-91735)Jakub Kulík2022-04-201-0/+4
|
* bpo-46053: Fix OSS audio support on NetBSD (GH-30065)Thomas Klausner2022-04-181-0/+78
|
* gh-91217: deprecate ossaudiodev (GH-91641)Brett Cannon2022-04-171-0/+7
| | | Automerge-Triggered-By: GH:brettcannon
* bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized ↵Eric Snow2022-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | global objects. (gh-30928) We're no longer using _Py_IDENTIFIER() (or _Py_static_string()) in any core CPython code. It is still used in a number of non-builtin stdlib modules. The replacement is: PyUnicodeObject (not pointer) fields under _PyRuntimeState, statically initialized as part of _PyRuntime. A new _Py_GET_GLOBAL_IDENTIFIER() macro facilitates lookup of the fields (along with _Py_GET_GLOBAL_STRING() for non-identifier strings). https://bugs.python.org/issue46541#msg411799 explains the rationale for this change. The core of the change is in: * (new) Include/internal/pycore_global_strings.h - the declarations for the global strings, along with the macros * Include/internal/pycore_runtime_init.h - added the static initializers for the global strings * Include/internal/pycore_global_objects.h - where the struct in pycore_global_strings.h is hooked into _PyRuntimeState * Tools/scripts/generate_global_objects.py - added generation of the global string declarations and static initializers I've also added a --check flag to generate_global_objects.py (along with make check-global-objects) to check for unused global strings. That check is added to the PR CI config. The remainder of this change updates the core code to use _Py_GET_GLOBAL_IDENTIFIER() instead of _Py_IDENTIFIER() and the related _Py*Id functions (likewise for _Py_GET_GLOBAL_STRING() instead of _Py_static_string()). This includes adding a few functions where there wasn't already an alternative to _Py*Id(), replacing the _Py_Identifier * parameter with PyObject *. The following are not changed (yet): * stop using _Py_IDENTIFIER() in the stdlib modules * (maybe) get rid of _Py_IDENTIFIER(), etc. entirely -- this may not be doable as at least one package on PyPI using this (private) API * (maybe) intern the strings during runtime init https://bugs.python.org/issue46541
* bpo-46303: Move fileutils.h private functions to internal C API (GH-30484)Victor Stinner2022-01-111-0/+5
| | | | | | | | | | Move almost all private functions of Include/cpython/fileutils.h to the internal C API Include/internal/pycore_fileutils.h. Only keep _Py_fopen_obj() in Include/cpython/fileutils.h, since it's used by _testcapi which must not use the internal C API. Move EncodeLocaleEx() and DecodeLocaleEx() functions from _testcapi to _testinternalcapi, since the C API moved to the internal C API.
* bpo-45434: pyport.h no longer includes <stdlib.h> (GH-28914)Victor Stinner2021-10-131-0/+1
| | | | | Include <stdlib.h> explicitly in C files. Python.h includes <wchar.h>.
* bpo-42519: Replace PyObject_MALLOC() with PyObject_Malloc() (GH-23587)Victor Stinner2020-12-011-2/+2
| | | | | | | | | No longer use deprecated aliases to functions: * Replace PyObject_MALLOC() with PyObject_Malloc() * Replace PyObject_REALLOC() with PyObject_Realloc() * Replace PyObject_FREE() with PyObject_Free() * Replace PyObject_Del() with PyObject_Free() * Replace PyObject_DEL() with PyObject_Free()
* bpo-40268: Remove unused structmember.h includes (GH-19530)Victor Stinner2020-04-151-1/+1
| | | | | | If only offsetof() is needed: include stddef.h instead. When structmember.h is used, add a comment explaining that PyMemberDef is used.
* bpo-39582: ossaudiodev module update helpers signature for ioctl calls. ↵David CARLIER2020-03-141-3/+3
| | | | (GH-18412)
* Remove a dead comment from ossaudiodev.c (#15346)Brett Cannon2019-08-201-2/+0
|
* bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)Jeroen Demeyer2019-07-081-1/+1
|
* bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async ↵Jeroen Demeyer2019-05-311-4/+4
| | | | | | | | | (GH-13464) Automatically replace tp_print -> tp_vectorcall_offset tp_compare -> tp_as_async tp_reserved -> tp_as_async
* bpo-34740: Get rid of tp_getattro in ossaudiodev.oss_audio_device. (GH-9421)Serhiy Storchaka2018-10-041-35/+34
| | | Use tp_members and tp_getset instead.
* Fix misleading mentions of tp_size in comments (GH-9093)Peter Eisentraut2018-09-101-2/+2
| | | | Many type object initializations labeled a field "tp_size" in the comment, but the name of that field is tp_basicsize.
* Add the const qualifier to "char *" variables that refer to literal strings. ↵Serhiy Storchaka2017-11-111-4/+4
| | | | (#4370)
* bpo-30022: Get rid of using EnvironmentError and IOError (except test… (#1051)Serhiy Storchaka2017-04-161-20/+20
|
* Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-231-10/+5
| | | | possible. Patch is writen with Coccinelle.
* Issue #28715: Added error checks for PyUnicode_AsUTF8().Serhiy Storchaka2016-11-201-3/+6
|\
| * Issue #28715: Added error checks for PyUnicode_AsUTF8().Serhiy Storchaka2016-11-201-3/+6
| |
* | more linux -> __linux__Benjamin Peterson2016-09-071-1/+1
| |
* | Issue #26854: Android has a different include path for soundcard.h.Stefan Krah2016-04-261-0/+4
|/
* Issue #23709, #23001: ossaudiodev now uses Py_ssize_t for sizes instead of intVictor Stinner2015-03-201-6/+7
| | | | | The module is now also "SSIZE_T clean" (for PyArg_Parse...() functions) since it switched to Py_buffer ("y*" argument format).
* Issue #23001: Fix typoVictor Stinner2015-03-201-1/+1
|
* Issue #23001: Few functions in modules mmap, ossaudiodev, socket, ssl, andSerhiy Storchaka2015-03-201-9/+19
| | | | | codecs, that accepted only read-only bytes-like object now accept writable bytes-like object too.
* Issue #23709: The ossaudiodev module now retries read/write when interrupted byVictor Stinner2015-03-191-28/+22
| | | | | | a signal (PEP 475). Use he new _Py_read() and _Py_write() functions.
* Issue #23694: Enhance _Py_open(), it now raises exceptionsVictor Stinner2015-03-171-7/+2
| | | | | | | | * _Py_open() now raises exceptions on error. If open() fails, it raises an OSError with the filename. * _Py_open() now releases the GIL while calling open() * Add _Py_open_noraise() when _Py_open() cannot be used because the GIL is not held
* Issue #22369: Change "context manager protocol" to "context management ↵Serhiy Storchaka2014-09-101-2/+2
| | | | protocol".
* Issue #16404: Add checks for return value of PyLong_FromLong() inSerhiy Storchaka2013-12-171-8/+1
|\ | | | | | | | | sys.getwindowsversion() and ossaudiodev.setparameters(). Reported by Ned Batchelder.
| * Issue #16404: Add checks for return value of PyLong_FromLong() inSerhiy Storchaka2013-12-171-8/+1
| | | | | | | | | | sys.getwindowsversion() and ossaudiodev.setparameters(). Reported by Ned Batchelder.
* | Issue #18571: Implementation of the PEP 446: file descriptors and file handlesVictor Stinner2013-08-271-2/+5
| | | | | | | | | | are now created non-inheritable; add functions os.get/set_inheritable(), os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
* | Use strncat() instead of strcat() to silence some warnings.Christian Heimes2013-07-201-3/+3
|/ | | | CID 486616, CID 486617, CID 486615
* Merge 3.2, Issue #17047: remove doubled words found in 2.7 to 3.4Terry Jan Reedy2013-03-111-1/+1
|\ | | | | | | Modules/*, as reported by Serhiy Storchaka and Matthew Barnett.
| * Issue #17047: remove doubled words found in 2.7 to 3.4 Modules/*,Terry Jan Reedy2013-03-111-1/+1
| | | | | | | | as reported by Serhiy Storchaka and Matthew Barnett.
* | Rename _Py_identifier to _Py_IDENTIFIER.Martin v. Löwis2011-10-141-1/+1
| |
* | Add API for static strings, primarily good for identifiers.Martin v. Löwis2011-10-091-1/+3
| | | | | | | | Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
* | Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by ThomasCharles-François Natali2011-09-291-0/+1
|\ \ | |/ | | | | Jarosch.
| * Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by ThomasCharles-François Natali2011-09-291-0/+1
| | | | | | | | Jarosch.
* | Use the new Py_ARRAY_LENGTH macroVictor Stinner2011-09-281-3/+3
| |
* | Issue #12287: Fix a stack corruption in ossaudiodev module when the FD isCharles-François Natali2011-08-281-0/+5
|\ \ | |/ | | | | greater than FD_SETSIZE.
| * Issue #12287: Fix a stack corruption in ossaudiodev module when the FD isCharles-François Natali2011-08-281-0/+5
| | | | | | | | greater than FD_SETSIZE.
* | Issue #12287: In ossaudiodev, check that the device isn't closed in severalCharles-François Natali2011-06-111-0/+91
|/ | | | methods.
* These are true PyCFunctions, after adding the second argument to oss_self, ↵Georg Brandl2010-10-241-5/+5
| | | | no need to cast.
* Add casts (one needed, one for consistency).Georg Brandl2010-10-241-4/+4
|
* #6518: enable context manager protocol for ossaudiodev types.Georg Brandl2010-10-231-0/+25
|
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-13/+13
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Issue #8139: ossaudiodev didn't initialize its types properly, thereforeAntoine Pitrou2010-03-231-1/+7
| | | | | some methods (such as oss_mixer_device.fileno()) were not available. Initial patch by Bertrand Janin.