summaryrefslogtreecommitdiffstats
path: root/Include/pybuffer.h
diff options
context:
space:
mode:
authorDavid Hewitt <1939362+davidhewitt@users.noreply.github.com>2022-10-31 14:01:32 (GMT)
committerGitHub <noreply@github.com>2022-10-31 14:01:32 (GMT)
commite98923c0be644c474ce0e318d40e0595e4484106 (patch)
tree2567dac3a484b51f2e0fa3690ea091182efa2b89 /Include/pybuffer.h
parenta41de32942b7ac14524587a08d219f3bfe346415 (diff)
downloadcpython-e98923c0be644c474ce0e318d40e0595e4484106.zip
cpython-e98923c0be644c474ce0e318d40e0595e4484106.tar.gz
cpython-e98923c0be644c474ce0e318d40e0595e4484106.tar.bz2
gh-98410: move getbufferproc and releasebufferproc to buffer.h (#31158)
This adds them to the Limited API.
Diffstat (limited to 'Include/pybuffer.h')
-rw-r--r--Include/pybuffer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/pybuffer.h b/Include/pybuffer.h
index 6893505..bbac609 100644
--- a/Include/pybuffer.h
+++ b/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);