summaryrefslogtreecommitdiff
path: root/Include/abstract.h
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-11-09 21:59:42 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2001-11-09 21:59:42 +0000
commit89c3a22a2788cb85b89990543e33236cd60ba307 (patch)
treec7da0d69ab040e3e3f3f5b94752bf182d7b205c9 /Include/abstract.h
parentda4ffeecf5106250ce1cb184b22f0c7e691e9f74 (diff)
downloadcpython-git-89c3a22a2788cb85b89990543e33236cd60ba307.tar.gz
Add PyObject_CheckReadBuffer(), which returns true if its argument
supports the single-segment readable buffer interface. Add documentation for this and other PyObject_XXXBuffer() calls.
Diffstat (limited to 'Include/abstract.h')
-rw-r--r--Include/abstract.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Include/abstract.h b/Include/abstract.h
index 8ebc3cda5a..a7105099bb 100644
--- a/Include/abstract.h
+++ b/Include/abstract.h
@@ -468,6 +468,15 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
*/
+ DL_IMPORT(int) PyObject_CheckReadBuffer(PyObject *obj);
+
+ /*
+ Checks whether an arbitrary object supports the (character,
+ single segment) buffer interface. Returns 1 on success, 0
+ on failure.
+
+ */
+
DL_IMPORT(int) PyObject_AsReadBuffer(PyObject *obj,
const void **buffer,
int *buffer_len);