Staging
v0.5.1
Revision 16b047904ca59831c28bcb811647f9f81590f1c8 authored by Jeremy Hylton on 07 November 2004, 14:04:00 UTC, committed by Jeremy Hylton on 07 November 2004, 14:04:00 UTC
There is no test for this change, because there is no way to provoke memory errors on demand.  Test suite passes, though.
1 parent 84a6c20
Raw File
bufferobject.h

/* Buffer object interface */

/* Note: the object's structure is private */

#ifndef Py_BUFFEROBJECT_H
#define Py_BUFFEROBJECT_H
#ifdef __cplusplus
extern "C" {
#endif


PyAPI_DATA(PyTypeObject) PyBuffer_Type;

#define PyBuffer_Check(op) ((op)->ob_type == &PyBuffer_Type)

#define Py_END_OF_BUFFER	(-1)

PyAPI_FUNC(PyObject *) PyBuffer_FromObject(PyObject *base,
                                                 int offset, int size);
PyAPI_FUNC(PyObject *) PyBuffer_FromReadWriteObject(PyObject *base,
                                                          int offset,
                                                          int size);

PyAPI_FUNC(PyObject *) PyBuffer_FromMemory(void *ptr, int size);
PyAPI_FUNC(PyObject *) PyBuffer_FromReadWriteMemory(void *ptr, int size);

PyAPI_FUNC(PyObject *) PyBuffer_New(int size);

#ifdef __cplusplus
}
#endif
#endif /* !Py_BUFFEROBJECT_H */
back to top