Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | #ifndef Py_BUFFEROBJECT_H |
2 | #define Py_BUFFEROBJECT_H | |
3 | #ifdef __cplusplus | |
4 | extern "C" { | |
5 | #endif | |
6 | ||
7 | ||
8 | PyAPI_DATA(PyTypeObject) PyBuffer_Type; | |
9 | ||
10 | #define PyBuffer_Check(op) ((op)->ob_type == &PyBuffer_Type) | |
11 | ||
12 | #define Py_END_OF_BUFFER (-1) | |
13 | ||
14 | PyAPI_FUNC(PyObject *) PyBuffer_FromObject(PyObject *base, | |
15 | int offset, int size); | |
16 | PyAPI_FUNC(PyObject *) PyBuffer_FromReadWriteObject(PyObject *base, | |
17 | int offset, | |
18 | int size); | |
19 | ||
20 | PyAPI_FUNC(PyObject *) PyBuffer_FromMemory(void *ptr, int size); | |
21 | PyAPI_FUNC(PyObject *) PyBuffer_FromReadWriteMemory(void *ptr, int size); | |
22 | ||
23 | PyAPI_FUNC(PyObject *) PyBuffer_New(int size); | |
24 | ||
25 | #ifdef __cplusplus | |
26 | } | |
27 | #endif | |
28 | #endif /* !Py_BUFFEROBJECT_H */ |