PHP 8.2.30
Preview: memoryobject.h Size: 2.22 KB
//opt/alt/python312/include/python3.12/cpython/memoryobject.h

#ifndef Py_CPYTHON_MEMORYOBJECT_H
#  error "this header file must not be included directly"
#endif

PyAPI_DATA(PyTypeObject) _PyManagedBuffer_Type;

/* The structs are declared here so that macros can work, but they shouldn't
   be considered public. Don't access their fields directly, use the macros
   and functions instead! */
#define _Py_MANAGED_BUFFER_RELEASED    0x001  /* access to exporter blocked */
#define _Py_MANAGED_BUFFER_FREE_FORMAT 0x002  /* free format */

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 */
#define _Py_MEMORYVIEW_RESTRICTED  0x020  /* Disallow new references to the memoryview's buffer */

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;

#define _PyMemoryView_CAST(op) _Py_CAST(PyMemoryViewObject*, op)

/* Get a pointer to the memoryview's private copy of the exporter's buffer. */
static inline Py_buffer* PyMemoryView_GET_BUFFER(PyObject *op) {
    return (&_PyMemoryView_CAST(op)->view);
}
#define PyMemoryView_GET_BUFFER(op) PyMemoryView_GET_BUFFER(_PyObject_CAST(op))

/* Get a pointer to the exporting object (this may be NULL!). */
static inline PyObject* PyMemoryView_GET_BASE(PyObject *op) {
    return _PyMemoryView_CAST(op)->view.obj;
}
#define PyMemoryView_GET_BASE(op) PyMemoryView_GET_BASE(_PyObject_CAST(op))

Directory Contents

Dirs: 0 × Files: 50

Name Size Perms Modified Actions
7.69 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.14 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
4.55 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.05 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.61 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
2.19 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
15.81 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
2.60 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.22 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.92 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.60 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
4.58 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
818 B lrw-r--r-- 2025-10-09 11:07:00
Edit Download
232 B lrw-r--r-- 2025-10-09 11:07:00
Edit Download
900 B lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.08 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
7.02 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
3.24 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.58 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
7.64 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
387 B lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.59 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
4.77 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
4.57 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
2.22 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
2.22 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
4.23 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
20.71 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
3.24 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.28 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
848 B lrw-r--r-- 2025-10-09 11:07:00
Edit Download
3.42 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.35 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.38 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
4.18 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
444 B lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.44 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
3.34 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
3.30 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
16.82 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
4.79 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.38 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
12.11 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
2.10 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
489 B lrw-r--r-- 2025-10-09 11:07:00
Edit Download
444 B lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.34 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
34.47 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download
564 B lrw-r--r-- 2025-10-09 11:07:00
Edit Download
1.98 KB lrw-r--r-- 2025-10-09 11:07:00
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).