diff options
author | Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com> | 2019-08-20 14:46:36 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2019-08-20 14:46:36 (GMT) |
commit | 9e66aba99925eebacfe137d9deb0ef1fdbc2d5db (patch) | |
tree | e9353ac99e9911959aadb9092ae35237ec06b5e2 /Doc/c-api/buffer.rst | |
parent | 18f8dcfa10d8a858b152d12a9ad8fa83b7e967f0 (diff) | |
download | cpython-9e66aba99925eebacfe137d9deb0ef1fdbc2d5db.zip cpython-9e66aba99925eebacfe137d9deb0ef1fdbc2d5db.tar.gz cpython-9e66aba99925eebacfe137d9deb0ef1fdbc2d5db.tar.bz2 |
bpo-15913: Implement PyBuffer_SizeFromFormat() (GH-13873)
Implement PyBuffer_SizeFromFormat() function (previously
documented but not implemented): call struct.calcsize().
Diffstat (limited to 'Doc/c-api/buffer.rst')
-rwxr-xr-x[-rw-r--r--] | Doc/c-api/buffer.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst index fdb8bd1..2536c74 100644..100755 --- a/Doc/c-api/buffer.rst +++ b/Doc/c-api/buffer.rst @@ -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) |