summaryrefslogtreecommitdiff
path: root/Doc/c-api/buffer.rst
diff options
context:
space:
mode:
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 e32719373c..820a3a6f99 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