Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a768db1

Browse files
committed
move getbufferproc and releasebufferproc to pybuffer.h
1 parent 7ee3aca commit a768db1

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

Doc/data/stable_abi.dat

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/cpython/object.h

-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ typedef struct _Py_Identifier {
5151

5252
#endif /* NEEDS_PY_IDENTIFIER */
5353

54-
typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
55-
typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
56-
57-
5854
typedef struct {
5955
/* Number implementations must check *both*
6056
arguments for proper type and implement the necessary conversions

Include/pybuffer.h

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ typedef struct {
3232
void *internal;
3333
} Py_buffer;
3434

35+
typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
36+
typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
37+
3538
/* Return 1 if the getbuffer function is available, otherwise return 0. */
3639
PyAPI_FUNC(int) PyObject_CheckBuffer(PyObject *obj);
3740

Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add ``getbufferproc`` and ``releasebufferproc`` to the stable API.

Misc/stable_abi.toml

+4
Original file line numberDiff line numberDiff line change
@@ -2299,3 +2299,7 @@
22992299
added = '3.12'
23002300
[macro.PY_VECTORCALL_ARGUMENTS_OFFSET]
23012301
added = '3.12'
2302+
[typedef.getbufferproc]
2303+
added = '3.12'
2304+
[typedef.releasebufferproc]
2305+
added = '3.12'

0 commit comments

Comments
 (0)