mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Change PyBuffer to Py_buffer to be consistent with other non-object structures like Py_complex. Add some more functionality to the memoryview object.
This commit is contained in:
parent
3f993c3b52
commit
8ae62b6094
16 changed files with 145 additions and 85 deletions
|
|
@ -10,7 +10,7 @@ extern "C" {
|
|||
typedef struct {
|
||||
PyObject_HEAD
|
||||
PyObject *base;
|
||||
PyBuffer view;
|
||||
Py_buffer view;
|
||||
} PyMemoryViewObject;
|
||||
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ PyAPI_FUNC(PyObject *) PyMemoryView_GetContiguous(PyObject *base, int buffertype
|
|||
|
||||
PyAPI_FUNC(PyObject *) PyMemoryView_FromObject(PyObject *base);
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyMemoryView_FromMemory(PyBuffer *info);
|
||||
PyAPI_FUNC(PyObject *) PyMemoryView_FromMemory(Py_buffer *info);
|
||||
/* create new if bufptr is NULL
|
||||
will be a new bytesobject in base */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue