mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-98410: move getbufferproc and releasebufferproc to buffer.h (#31158)
This adds them to the Limited API.
This commit is contained in:
parent
a41de32942
commit
e98923c0be
5 changed files with 10 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue