[Python-checkins] bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994) (GH-15055)

Antoine Pitrou webhook-mailer at python.org
Wed Jul 31 10:57:15 EDT 2019


https://github.com/python/cpython/commit/353306137176985f1a2995ff964b0c00eccd1434
commit: 353306137176985f1a2995ff964b0c00eccd1434
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Antoine Pitrou <antoine at python.org>
date: 2019-07-31T16:57:09+02:00
summary:

bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994) (GH-15055)

(cherry picked from commit 1b29af83bc17e773b0c0d117f5fe1018fde46b0d)

Co-authored-by: Hai Shi <shihai1992 at gmail.com>

files:
M Doc/c-api/buffer.rst

diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst
index 1d4ac457e54c..71e5b32f1fe5 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*.



More information about the Python-checkins mailing list