From e98965a47251f33c762cf7d7467da1127f4c3e78 Mon Sep 17 00:00:00 2001 From: Hai Shi Date: Wed, 31 Jul 2019 09:48:15 -0500 Subject: [PATCH] bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994) (cherry picked from commit 1b29af83bc17e773b0c0d117f5fe1018fde46b0d) Co-authored-by: Hai Shi --- Doc/c-api/buffer.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst index 1d4ac457e54cfd..71e5b32f1fe5a4 100644 --- a/Doc/c-api/buffer.rst +++ b/Doc/c-api/buffer.rst @@ -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*.