Add missing issue number in Misc/NEWS entry.
[python.git] / Include / bufferobject.h
blob6dd83458c58d9839cc146ccd657149c37a8f7457
2 /* Buffer object interface */
4 /* Note: the object's structure is private */
6 #ifndef Py_BUFFEROBJECT_H
7 #define Py_BUFFEROBJECT_H
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
13 PyAPI_DATA(PyTypeObject) PyBuffer_Type;
15 #define PyBuffer_Check(op) (Py_TYPE(op) == &PyBuffer_Type)
17 #define Py_END_OF_BUFFER (-1)
19 PyAPI_FUNC(PyObject *) PyBuffer_FromObject(PyObject *base,
20 Py_ssize_t offset, Py_ssize_t size);
21 PyAPI_FUNC(PyObject *) PyBuffer_FromReadWriteObject(PyObject *base,
22 Py_ssize_t offset,
23 Py_ssize_t size);
25 PyAPI_FUNC(PyObject *) PyBuffer_FromMemory(void *ptr, Py_ssize_t size);
26 PyAPI_FUNC(PyObject *) PyBuffer_FromReadWriteMemory(void *ptr, Py_ssize_t size);
28 PyAPI_FUNC(PyObject *) PyBuffer_New(Py_ssize_t size);
30 #ifdef __cplusplus
32 #endif
33 #endif /* !Py_BUFFEROBJECT_H */