]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994) (GH-15055)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 31 Jul 2019 14:57:09 +0000 (07:57 -0700)
committerAntoine Pitrou <antoine@python.org>
Wed, 31 Jul 2019 14:57:09 +0000 (16:57 +0200)
(cherry picked from commit 1b29af83bc17e773b0c0d117f5fe1018fde46b0d)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
Doc/c-api/buffer.rst

index 1d4ac457e54cfd7f112a58ff4fa37b8d130888cd..71e5b32f1fe5a435039adca6330ded552d69713b 100644 (file)
@@ -475,6 +475,12 @@ Buffer-related functions
    (*order* is ``'A'``).  Return ``0`` otherwise.  This function always succeeds.
 
 
+.. c:function:: void* PyBuffer_GetPointer(Py_buffer *view, 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_ToContiguous(void *buf, Py_buffer *src, Py_ssize_t len, char order)
 
    Copy *len* bytes from *src* to its contiguous representation in *buf*.