summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/objbuffer.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-12-18 11:57:17 (GMT)
committerGitHub <noreply@github.com>2018-12-18 11:57:17 (GMT)
commit3fcc1e08db6fb7e17acc4a8f63be3e42f52f094b (patch)
tree4f142af24eb8ba7869649598ac36be5aa35e192d /Doc/c-api/objbuffer.rst
parent62a68b762a479a72c3defba9ace5f72a0063c5c6 (diff)
downloadcpython-3fcc1e08db6fb7e17acc4a8f63be3e42f52f094b.zip
cpython-3fcc1e08db6fb7e17acc4a8f63be3e42f52f094b.tar.gz
cpython-3fcc1e08db6fb7e17acc4a8f63be3e42f52f094b.tar.bz2
bpo-35461: Document C API functions which suppress exceptions. (GH-11119)
Diffstat (limited to 'Doc/c-api/objbuffer.rst')
-rw-r--r--Doc/c-api/objbuffer.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/c-api/objbuffer.rst b/Doc/c-api/objbuffer.rst
index e7f4fde..9ad7c57 100644
--- a/Doc/c-api/objbuffer.rst
+++ b/Doc/c-api/objbuffer.rst
@@ -39,7 +39,11 @@ an object, and :c:func:`PyBuffer_Release` when the buffer view can be released.
.. c:function:: int PyObject_CheckReadBuffer(PyObject *o)
Returns ``1`` if *o* supports the single-segment readable buffer interface.
- Otherwise returns ``0``.
+ Otherwise returns ``0``. This function always succeeds.
+
+ Note that this function tries to get and release a buffer, and exceptions
+ which occur while calling correspoding functions will get suppressed.
+ To get error reporting use :c:func:`PyObject_GetBuffer()` instead.
.. c:function:: int PyObject_AsWriteBuffer(PyObject *obj, void **buffer, Py_ssize_t *buffer_len)