Copyright (C) 2000-2012 |
GNU Info (python2.1-api.info)Buffer ProtocolBuffer Protocol =============== `int PyObject_AsCharBuffer(PyObject *obj, const char **buffer, int *buffer_len)' Returns a pointer to a read-only memory location useable as character- based input. The OBJ argument must support the single-segment character buffer interface. On success, returns `0', sets BUFFER to the memory location and BUFFER_LEN to the buffer length. Returns `-1' and sets a `TypeError' on error. _Added in Python version 1.6_ `int PyObject_AsReadBuffer(PyObject *obj, const char **buffer, int *buffer_len)' Returns a pointer to a read-only memory location containing arbitrary data. The OBJ argument must support the single-segment readable buffer interface. On success, returns `0', sets BUFFER to the memory location and BUFFER_LEN to the buffer length. Returns `-1' and sets a `TypeError' on error. _Added in Python version 1.6_ `int PyObject_AsWriteBuffer(PyObject *obj, const char **buffer, int *buffer_len)' Returns a pointer to a writeable memory location. The OBJ argument must support the single-segment, character buffer interface. On success, returns `0', sets BUFFER to the memory location and BUFFER_LEN to the buffer length. Returns `-1' and sets a `TypeError' on error. _Added in Python version 1.6_ automatically generated by info2www version 1.2.2.9 |