mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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.
This commit is contained in:
parent
da4ffeecf5
commit
89c3a22a27
3 changed files with 83 additions and 29 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue