[issue45459] Limited API support for Py_buffer

Christian Heimes report at bugs.python.org
Thu Dec 9 04:14:00 EST 2021


Christian Heimes <lists at cheimes.de> added the comment:

Thanks for the investigation. I didn't know about C99 Standard 6.7.8.21. That's a useful and sensible extension to the language.

In my opinion it is neither useful to extend the Py_buffer struct with a version tag nor to force users to allocate the struct on the heap. The current design has worked for over 13 years. Any deviation from the established design poses a risk to break 3rd party software.

I could be convinced to add PyBuffer_New() and PyBuffer_Free() as additional feature, but their use should be optional. The function were part of my first PR GH-29035.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________


More information about the Python-bugs-list mailing list