Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-46140: take more Py_buffer arguments as const * #30217

Merged
merged 4 commits into from
Dec 22, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Misc/NEWS.d/next/C API/2021-12-21-22-56-36.bpo-46140.dvXkYK.rst
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
  • Loading branch information
serhiy-storchaka and kumaraditya303 committed Dec 22, 2021
commit 8c119957d356c3d2eed73f62b114849d6245bf07
Original file line number Diff line number Diff line change
@@ -1 +1 @@
``PyBuffer_GetPointer``, ``PyBuffer_FromContiguous``, ``PyBuffer_ToContiguous`` and ``PyMemoryView_FromBuffer`` now take buffer info by const ``Py_buffer *`` instead of ``Py_buffer *``, as they do not need mutability. ``PyBuffer_FromContiguous`` also now takes the source buffer as ``const void *``, and similarly ``PyBuffer_GetPointer`` takes the strides as ``const Py_ssize_t *``.
:c:func:`PyBuffer_GetPointer`, :c:func:`PyBuffer_FromContiguous`, :c:func:`PyBuffer_ToContiguous` and :c:func:`PyMemoryView_FromBuffer` now take buffer info by const ``Py_buffer *`` instead of ``Py_buffer *``, as they do not need mutability. :c:func:`PyBuffer_FromContiguous` also now takes the source buffer as ``const void *``, and similarly :c:func:`PyBuffer_GetPointer` takes the strides as ``const Py_ssize_t *``.
serhiy-storchaka marked this conversation as resolved.
Show resolved Hide resolved