Home
last modified time | relevance | path

Searched refs:PyBUF_WRITE (Results 1 – 6 of 6) sorted by relevance

/third_party/python/Doc/c-api/
Dmemoryview.rst26 *flags* can be one of :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE`.
/third_party/python/Objects/
Dmemoryobject.c736 assert(flags == PyBUF_READ || flags == PyBUF_WRITE); in PyMemoryView_FromMemory()
742 readonly = (flags == PyBUF_WRITE) ? 0 : 1; in PyMemoryView_FromMemory()
926 assert(buffertype == PyBUF_READ || buffertype == PyBUF_WRITE); in PyMemoryView_GetContiguous()
934 if (buffertype == PyBUF_WRITE && view->readonly) { in PyMemoryView_GetContiguous()
944 if (buffertype == PyBUF_WRITE) { in PyMemoryView_GetContiguous()
1999 x->mview = PyMemoryView_FromMemory(x->item, itemsize, PyBUF_WRITE); in struct_get_unpacker()
/third_party/python/Include/cpython/
Dobject.h100 #define PyBUF_WRITE 0x200 macro
/third_party/python/Modules/
D_testbuffer.c416 mview = PyMemoryView_FromMemory(ptr, itemsize, PyBUF_WRITE); in pack_single()
714 mview = PyMemoryView_FromMemory(item, base->itemsize, PyBUF_WRITE); in ndarray_as_list()
2413 if (type != PyBUF_READ && type != PyBUF_WRITE) { in get_contiguous()
2888 PyModule_AddIntMacro(m, PyBUF_WRITE); in PyInit__testbuffer()
D_pickle.c1414 PyObject *buf_obj = PyMemoryView_FromMemory(buf, n, PyBUF_WRITE); in _Unpickler_ReadInto()
/third_party/python/Lib/test/
Dtest_buffer.py3969 self.assertRaises(BufferError, get_contiguous, b'x', PyBUF_WRITE, 'C')
3973 self.assertRaises(BufferError, get_contiguous, nd, PyBUF_WRITE, 'A')
3992 m = get_contiguous(nd, PyBUF_WRITE, order)
4017 m = get_contiguous(nd, PyBUF_WRITE, order)
4023 m = get_contiguous(nd, PyBUF_WRITE, order)
4049 m = get_contiguous(nd, PyBUF_WRITE, order)
4052 self.assertRaises(BufferError, get_contiguous, nd, PyBUF_WRITE, 'F')
4059 m = get_contiguous(nd, PyBUF_WRITE, order)
4062 self.assertRaises(BufferError, get_contiguous, nd, PyBUF_WRITE, 'C')
4069 self.assertRaises(BufferError, get_contiguous, nd, PyBUF_WRITE,