summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/buffer.rst
diff options
context:
space:
mode:
authorDavid Hewitt <1939362+davidhewitt@users.noreply.github.com>2021-12-22 13:07:46 (GMT)
committerGitHub <noreply@github.com>2021-12-22 13:07:46 (GMT)
commit31ff96712e8f89ac1056c2da880b44650002219f (patch)
treef6cbc0c62bb78c3251a2ff7364fba22b6b36007a /Doc/c-api/buffer.rst
parentfc54e722a2e66971f1a8e16cff24c844bf9c5ac4 (diff)
downloadcpython-31ff96712e8f89ac1056c2da880b44650002219f.zip
cpython-31ff96712e8f89ac1056c2da880b44650002219f.tar.gz
cpython-31ff96712e8f89ac1056c2da880b44650002219f.tar.bz2
bpo-46140: take more Py_buffer arguments as const * (GH-30217)
Diffstat (limited to 'Doc/c-api/buffer.rst')
-rw-r--r--Doc/c-api/buffer.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst
index e327193..820a3a6 100644
--- a/Doc/c-api/buffer.rst
+++ b/Doc/c-api/buffer.rst
@@ -470,27 +470,27 @@ Buffer-related functions
.. versionadded:: 3.9
-.. c:function:: int PyBuffer_IsContiguous(Py_buffer *view, char order)
+.. c:function:: int PyBuffer_IsContiguous(const Py_buffer *view, char order)
Return ``1`` if the memory defined by the *view* is C-style (*order* is
``'C'``) or Fortran-style (*order* is ``'F'``) :term:`contiguous` or either one
(*order* is ``'A'``). Return ``0`` otherwise. This function always succeeds.
-.. c:function:: void* PyBuffer_GetPointer(Py_buffer *view, Py_ssize_t *indices)
+.. c:function:: void* PyBuffer_GetPointer(const Py_buffer *view, const Py_ssize_t *indices)
Get the memory area pointed to by the *indices* inside the given *view*.
*indices* must point to an array of ``view->ndim`` indices.
-.. c:function:: int PyBuffer_FromContiguous(Py_buffer *view, void *buf, Py_ssize_t len, char fort)
+.. c:function:: int PyBuffer_FromContiguous(const Py_buffer *view, const void *buf, Py_ssize_t len, char fort)
Copy contiguous *len* bytes from *buf* to *view*.
*fort* can be ``'C'`` or ``'F'`` (for C-style or Fortran-style ordering).
``0`` is returned on success, ``-1`` on error.
-.. c:function:: int PyBuffer_ToContiguous(void *buf, Py_buffer *src, Py_ssize_t len, char order)
+.. c:function:: int PyBuffer_ToContiguous(void *buf, const Py_buffer *src, Py_ssize_t len, char order)
Copy *len* bytes from *src* to its contiguous representation in *buf*.
*order* can be ``'C'`` or ``'F'`` or ``'A'`` (for C-style or Fortran-style