[issue46140] Some API methods could take const Py_buffer* instead of Py_buffer *

2021-12-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution David. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46140] Some API methods could take const Py_buffer* instead of Py_buffer *

2021-12-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 31ff96712e8f89ac1056c2da880b44650002219f by David Hewitt in branch 'main': bpo-46140: take more Py_buffer arguments as const * (GH-30217) https://github.com/python/cpython/commit/31ff96712e8f89ac1056c2da880b44650002219f -- nosy:

[issue46140] Some API methods could take const Py_buffer* instead of Py_buffer *

2021-12-20 Thread David Hewitt
Change by David Hewitt : -- keywords: +patch pull_requests: +28438 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30217 ___ Python tracker ___

[issue46140] Some API methods could take const Py_buffer* instead of Py_buffer *

2021-12-20 Thread David Hewitt
New submission from David Hewitt : The limited api methods `PyBuffer_GetPointer`, `PyBuffer_FromContiguous`, `PyBuffer_ToContiguous` and `PyMemoryView_FromBuffer` take buffer arguments as `Py_buffer *`. They do not mutate the buffer info, so could simply take `const Py_buffer *`. There is