gh-98410: move getbufferproc and releasebufferproc to buffer.h (#31158)

This adds them to the Limited API.
This commit is contained in:
David Hewitt 2022-10-31 14:01:32 +00:00 committed by GitHub
parent a41de32942
commit e98923c0be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 4 deletions

View file

@ -51,10 +51,6 @@ typedef struct _Py_Identifier {
#endif /* NEEDS_PY_IDENTIFIER */
typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
typedef struct {
/* Number implementations must check *both*
arguments for proper type and implement the necessary conversions

View file

@ -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);