mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-15913: Implement PyBuffer_SizeFromFormat() (GH-13873)
Implement PyBuffer_SizeFromFormat() function (previously documented but not implemented): call struct.calcsize().
This commit is contained in:
parent
18f8dcfa10
commit
9e66aba999
6 changed files with 83 additions and 3 deletions
6
Doc/c-api/buffer.rst
Normal file → Executable file
6
Doc/c-api/buffer.rst
Normal file → Executable file
|
@ -462,10 +462,12 @@ Buffer-related functions
|
|||
:c:func:`PyObject_GetBuffer`.
|
||||
|
||||
|
||||
.. c:function:: Py_ssize_t PyBuffer_SizeFromFormat(const char *)
|
||||
.. c:function:: Py_ssize_t PyBuffer_SizeFromFormat(const char *format)
|
||||
|
||||
Return the implied :c:data:`~Py_buffer.itemsize` from :c:data:`~Py_buffer.format`.
|
||||
This function is not yet implemented.
|
||||
On error, raise an exception and return -1.
|
||||
|
||||
.. versionadded:: 3.9
|
||||
|
||||
|
||||
.. c:function:: int PyBuffer_IsContiguous(Py_buffer *view, char order)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue