diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2023-05-08 16:52:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-08 16:52:41 (GMT) |
commit | 405eacc1b87a42e19fd176131e70537f0539e05e (patch) | |
tree | e5507b3b2b1c4266ef74b388aaf024386c37cfa0 /Include | |
parent | 874010c6cab2e079069767619af2e0eab05ad0b2 (diff) | |
download | cpython-405eacc1b87a42e19fd176131e70537f0539e05e.zip cpython-405eacc1b87a42e19fd176131e70537f0539e05e.tar.gz cpython-405eacc1b87a42e19fd176131e70537f0539e05e.tar.bz2 |
gh-104223: Fix issues with inheriting from buffer classes (#104227)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Diffstat (limited to 'Include')
-rw-r--r-- | Include/cpython/memoryobject.h | 1 | ||||
-rw-r--r-- | Include/internal/pycore_memoryobject.h | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Include/cpython/memoryobject.h b/Include/cpython/memoryobject.h index deab3cc..3837fa8 100644 --- a/Include/cpython/memoryobject.h +++ b/Include/cpython/memoryobject.h @@ -24,6 +24,7 @@ typedef struct { #define _Py_MEMORYVIEW_FORTRAN 0x004 /* Fortran contiguous layout */ #define _Py_MEMORYVIEW_SCALAR 0x008 /* scalar: ndim = 0 */ #define _Py_MEMORYVIEW_PIL 0x010 /* PIL-style layout */ +#define _Py_MEMORYVIEW_RESTRICTED 0x020 /* Disallow new references to the memoryview's buffer */ typedef struct { PyObject_VAR_HEAD diff --git a/Include/internal/pycore_memoryobject.h b/Include/internal/pycore_memoryobject.h index acc12c9..fe19e3f 100644 --- a/Include/internal/pycore_memoryobject.h +++ b/Include/internal/pycore_memoryobject.h @@ -9,7 +9,8 @@ extern "C" { #endif PyObject * -PyMemoryView_FromObjectAndFlags(PyObject *v, int flags); +_PyMemoryView_FromBufferProc(PyObject *v, int flags, + getbufferproc bufferproc); #ifdef __cplusplus } |