mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
bpo-45459: Add Py_buffer to limited API (GH-29991)
- [x] ``Py_buffer`` struct - [x] ``PyBuffer_*()`` API functions - [x] ``PyBUF_*`` constants - [x] ``Py_bf_getbuffer`` and ``Py_bf_releasebuffer`` type slots - [x] ``PyMemoryView_FromBuffer()`` API - [x] tests for limited API - [x] ``make regen-limited-abi`` - [x] documentation update - [ ] export ``PyPickleBuffer*()`` API ???
This commit is contained in:
parent
08f8301b21
commit
f66c857572
17 changed files with 308 additions and 131 deletions
|
@ -499,6 +499,13 @@ Buffer-related functions
|
|||
This function fails if *len* != *src->len*.
|
||||
|
||||
|
||||
.. c:function:: int PyObject_CopyData(Py_buffer *dest, Py_buffer *src)
|
||||
|
||||
Copy data from *src* to *dest* buffer. Can convert between C-style and
|
||||
or Fortran-style buffers.
|
||||
|
||||
``0`` is returned on success, ``-1`` on error.
|
||||
|
||||
.. c:function:: void PyBuffer_FillContiguousStrides(int ndims, Py_ssize_t *shape, Py_ssize_t *strides, int itemsize, char order)
|
||||
|
||||
Fill the *strides* array with byte-strides of a :term:`contiguous` (C-style if
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue