Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/python2....
File: memoryobject.h
/* Memory view object. In Python this is available as "memoryview". */
[0] Fix | Delete
[1] Fix | Delete
#ifndef Py_MEMORYOBJECT_H
[2] Fix | Delete
#define Py_MEMORYOBJECT_H
[3] Fix | Delete
#ifdef __cplusplus
[4] Fix | Delete
extern "C" {
[5] Fix | Delete
#endif
[6] Fix | Delete
[7] Fix | Delete
PyAPI_DATA(PyTypeObject) PyMemoryView_Type;
[8] Fix | Delete
[9] Fix | Delete
#define PyMemoryView_Check(op) (Py_TYPE(op) == &PyMemoryView_Type)
[10] Fix | Delete
[11] Fix | Delete
/* Get a pointer to the underlying Py_buffer of a memoryview object. */
[12] Fix | Delete
#define PyMemoryView_GET_BUFFER(op) (&((PyMemoryViewObject *)(op))->view)
[13] Fix | Delete
/* Get a pointer to the PyObject from which originates a memoryview object. */
[14] Fix | Delete
#define PyMemoryView_GET_BASE(op) (((PyMemoryViewObject *)(op))->view.obj)
[15] Fix | Delete
[16] Fix | Delete
[17] Fix | Delete
PyAPI_FUNC(PyObject *) PyMemoryView_GetContiguous(PyObject *base,
[18] Fix | Delete
int buffertype,
[19] Fix | Delete
char fort);
[20] Fix | Delete
[21] Fix | Delete
/* Return a contiguous chunk of memory representing the buffer
[22] Fix | Delete
from an object in a memory view object. If a copy is made then the
[23] Fix | Delete
base object for the memory view will be a *new* bytes object.
[24] Fix | Delete
[25] Fix | Delete
Otherwise, the base-object will be the object itself and no
[26] Fix | Delete
data-copying will be done.
[27] Fix | Delete
[28] Fix | Delete
The buffertype argument can be PyBUF_READ, PyBUF_WRITE,
[29] Fix | Delete
PyBUF_SHADOW to determine whether the returned buffer
[30] Fix | Delete
should be READONLY, WRITABLE, or set to update the
[31] Fix | Delete
original buffer if a copy must be made. If buffertype is
[32] Fix | Delete
PyBUF_WRITE and the buffer is not contiguous an error will
[33] Fix | Delete
be raised. In this circumstance, the user can use
[34] Fix | Delete
PyBUF_SHADOW to ensure that a writable temporary
[35] Fix | Delete
contiguous buffer is returned. The contents of this
[36] Fix | Delete
contiguous buffer will be copied back into the original
[37] Fix | Delete
object after the memoryview object is deleted as long as
[38] Fix | Delete
the original object is writable and allows setting an
[39] Fix | Delete
exclusive write lock. If this is not allowed by the
[40] Fix | Delete
original object, then a BufferError is raised.
[41] Fix | Delete
[42] Fix | Delete
If the object is multi-dimensional and if fortran is 'F',
[43] Fix | Delete
the first dimension of the underlying array will vary the
[44] Fix | Delete
fastest in the buffer. If fortran is 'C', then the last
[45] Fix | Delete
dimension will vary the fastest (C-style contiguous). If
[46] Fix | Delete
fortran is 'A', then it does not matter and you will get
[47] Fix | Delete
whatever the object decides is more efficient.
[48] Fix | Delete
[49] Fix | Delete
A new reference is returned that must be DECREF'd when finished.
[50] Fix | Delete
*/
[51] Fix | Delete
[52] Fix | Delete
PyAPI_FUNC(PyObject *) PyMemoryView_FromObject(PyObject *base);
[53] Fix | Delete
[54] Fix | Delete
PyAPI_FUNC(PyObject *) PyMemoryView_FromBuffer(Py_buffer *info);
[55] Fix | Delete
/* create new if bufptr is NULL
[56] Fix | Delete
will be a new bytesobject in base */
[57] Fix | Delete
[58] Fix | Delete
[59] Fix | Delete
/* The struct is declared here so that macros can work, but it shouldn't
[60] Fix | Delete
be considered public. Don't access those fields directly, use the macros
[61] Fix | Delete
and functions instead! */
[62] Fix | Delete
typedef struct {
[63] Fix | Delete
PyObject_HEAD
[64] Fix | Delete
PyObject *base;
[65] Fix | Delete
Py_buffer view;
[66] Fix | Delete
} PyMemoryViewObject;
[67] Fix | Delete
[68] Fix | Delete
[69] Fix | Delete
#ifdef __cplusplus
[70] Fix | Delete
}
[71] Fix | Delete
#endif
[72] Fix | Delete
#endif /* !Py_MEMORYOBJECT_H */
[73] Fix | Delete
[74] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function