diff options
author | da-woods <dw-git@d-woods.co.uk> | 2022-10-10 00:55:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-10 00:55:53 (GMT) |
commit | c459fedf7cfd5dadf72e088d789c7375b3a6e093 (patch) | |
tree | 9545909c733def41b8058ce1f249379d0cb2ecb3 /Doc/c-api/buffer.rst | |
parent | 281a3f18cc2afac0fa92c75e807775971e531711 (diff) | |
download | cpython-c459fedf7cfd5dadf72e088d789c7375b3a6e093.zip cpython-c459fedf7cfd5dadf72e088d789c7375b3a6e093.tar.gz cpython-c459fedf7cfd5dadf72e088d789c7375b3a6e093.tar.bz2 |
Fix types in buffer/memoryview docs (#98118)
The definition of obj in the `Py_buffer` struct is as a PyObject*
https://github.com/python/cpython/blob/ec091bd47e2f968b0d1631b9a8104283a7beeb1b/Include/pybuffer.h#L22
PyMemoryView_GET_BASE returns `.obj` - thus its return type
should be a PyObject* (or at least a void*). It definitely
doesn't return `Py_buffer`
Diffstat (limited to 'Doc/c-api/buffer.rst')
-rw-r--r-- | Doc/c-api/buffer.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst index 05e131d..a04062f 100644 --- a/Doc/c-api/buffer.rst +++ b/Doc/c-api/buffer.rst @@ -99,7 +99,7 @@ a buffer, see :c:func:`PyObject_GetBuffer`. For :term:`contiguous` arrays, the value points to the beginning of the memory block. - .. c:member:: void *obj + .. c:member:: PyObject *obj A new reference to the exporting object. The reference is owned by the consumer and automatically decremented and set to ``NULL`` by |