Message324755
In the C API, PyMemoryViewObject has a mbuf.master attribute, Include/memoryview.h:
---
typedef struct {
PyObject_HEAD
int flags; /* state flags */
Py_ssize_t exports; /* number of direct memoryview exports */
Py_buffer master; /* snapshot buffer obtained from the original exporter */
} _PyManagedBufferObject;
/* memoryview state flags */
#define _Py_MEMORYVIEW_RELEASED 0x001 /* access to master buffer blocked */
#define _Py_MEMORYVIEW_C 0x002 /* C-contiguous layout */
#define _Py_MEMORYVIEW_FORTRAN 0x004 /* Fortran contiguous layout */
#define _Py_MEMORYVIEW_SCALAR 0x008 /* scalar: ndim = 0 */
#define _Py_MEMORYVIEW_PIL 0x010 /* PIL-style layout */
typedef struct {
PyObject_VAR_HEAD
_PyManagedBufferObject *mbuf; /* managed buffer */
Py_hash_t hash; /* hash value for read-only views */
int flags; /* state flags */
Py_ssize_t exports; /* number of buffer re-exports */
Py_buffer view; /* private copy of the exporter's view */
PyObject *weakreflist;
Py_ssize_t ob_array[1]; /* shape, strides, suboffsets */
} PyMemoryViewObject;
--- |
|
Date |
User |
Action |
Args |
2018-09-07 15:06:26 | vstinner | set | recipients:
+ vstinner, barry, terry.reedy, paul.moore, ronaldoussoren, larry, tim.golden, ned.deily, ezio.melotti, eric.araujo, mrabarnett, r.david.murray, asvetlov, docs@python, zach.ware, yselivanov, koobs, steve.dower, dstufft, Alex.Willmer, ammar2 |
2018-09-07 15:06:26 | vstinner | set | messageid: <1536332786.42.0.56676864532.issue34605@psf.upfronthosting.co.za> |
2018-09-07 15:06:26 | vstinner | link | issue34605 messages |
2018-09-07 15:06:26 | vstinner | create | |
|