This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Alex.Willmer, ammar2, asvetlov, barry, docs@python, dstufft, eric.araujo, ezio.melotti, koobs, larry, mrabarnett, ned.deily, paul.moore, r.david.murray, ronaldoussoren, steve.dower, terry.reedy, tim.golden, vstinner, yselivanov, zach.ware
Date 2018-09-07.15:06:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1536332786.42.0.56676864532.issue34605@psf.upfronthosting.co.za>
In-reply-to
Content
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;
---
History
Date User Action Args
2018-09-07 15:06:26vstinnersetrecipients: + 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:26vstinnersetmessageid: <1536332786.42.0.56676864532.issue34605@psf.upfronthosting.co.za>
2018-09-07 15:06:26vstinnerlinkissue34605 messages
2018-09-07 15:06:26vstinnercreate