bpo-15913: Implement PyBuffer_SizeFromFormat() (GH-13873)
Implement PyBuffer_SizeFromFormat() function (previously
documented but not implemented): call struct.calcsize().
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst
old mode 100644
new mode 100755
index fdb8bd1..2536c74
--- a/Doc/c-api/buffer.rst
+++ b/Doc/c-api/buffer.rst
@@ -462,10 +462,12 @@
: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)