summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Include/pybuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tools/python3/src/Include/pybuffer.h')
-rw-r--r--contrib/tools/python3/src/Include/pybuffer.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/tools/python3/src/Include/pybuffer.h b/contrib/tools/python3/src/Include/pybuffer.h
index 6893505e66e..ca1c6058d90 100644
--- a/contrib/tools/python3/src/Include/pybuffer.h
+++ b/contrib/tools/python3/src/Include/pybuffer.h
@@ -32,6 +32,9 @@ typedef struct {
void *internal;
} Py_buffer;
+typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
+typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
+
/* Return 1 if the getbuffer function is available, otherwise return 0. */
PyAPI_FUNC(int) PyObject_CheckBuffer(PyObject *obj);
@@ -101,7 +104,7 @@ PyAPI_FUNC(void) PyBuffer_Release(Py_buffer *view);
/* Maximum number of dimensions */
#define PyBUF_MAX_NDIM 64
-/* Flags for getting buffers */
+/* Flags for getting buffers. Keep these in sync with inspect.BufferFlags. */
#define PyBUF_SIMPLE 0
#define PyBUF_WRITABLE 0x0001