You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refactor ossaudiodev: use _Py_read and _Py_write with the Py_buffer #67897
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2015-03-20.09:40:21.099>created_at=<Date2015-03-19.13:36:49.351>labels= []
title='Refactor ossaudiodev: use _Py_read and _Py_write with the Py_buffer'updated_at=<Date2015-03-20.09:40:21.099>user='https://github.com/vstinner'
Attached patch enhances ossaudiodev to support buffer larger than 2 GB (replace the C int type with C Py_ssize_t). It uses the new _Py_read() and _Py_write() functions added in the issue bpo-23708 with the Py_buffer API.
By the way, I don't understand the purpose of the input and output counters (icount and ocount fields of the oss_audio_t structure), they don't look to be used?!
Activity
vstinner commentedon Mar 19, 2015
Attached patch enhances ossaudiodev to support buffer larger than 2 GB (replace the C int type with C Py_ssize_t). It uses the new _Py_read() and _Py_write() functions added in the issue bpo-23708 with the Py_buffer API.
By the way, I don't understand the purpose of the input and output counters (icount and ocount fields of the oss_audio_t structure), they don't look to be used?!
vstinner commentedon Mar 19, 2015
Oh, I forgot to mention the advantage of using _Py_read() and _Py_write(): they retry read/write when interrupted by a signal, to support the PEP-475.
python-dev commentedon Mar 19, 2015
New changeset d564695b67bb by Victor Stinner in branch 'default':
Issue bpo-23709: The ossaudiodev module now retries read/write when interrupted by
https://hg.python.org/cpython/rev/d564695b67bb
vstinner commentedon Mar 19, 2015
I commited changes to use _Py_read() and _Py_write().
I attach an updated patch to use Py_ssize_t instead of int, and to use Py_buffer instead of char*.
python-dev commentedon Mar 20, 2015
New changeset d478a2a5738a by Victor Stinner in branch 'default':
Issue bpo-23709, bpo-23001: ossaudiodev now uses Py_ssize_t for sizes instead of int
https://hg.python.org/cpython/rev/d478a2a5738a