diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-11-09 21:59:42 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-11-09 21:59:42 (GMT) |
commit | 89c3a22a2788cb85b89990543e33236cd60ba307 (patch) | |
tree | c7da0d69ab040e3e3f3f5b94752bf182d7b205c9 /Include | |
parent | da4ffeecf5106250ce1cb184b22f0c7e691e9f74 (diff) | |
download | cpython-89c3a22a2788cb85b89990543e33236cd60ba307.zip cpython-89c3a22a2788cb85b89990543e33236cd60ba307.tar.gz cpython-89c3a22a2788cb85b89990543e33236cd60ba307.tar.bz2 |
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')
-rw-r--r-- | Include/abstract.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Include/abstract.h b/Include/abstract.h index 8ebc3cd..a710509 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); |