mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +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
|
|
@ -601,7 +601,7 @@ static struct PyMethodDef mmap_object_methods[] = {
|
|||
/* Functions for treating an mmap'ed file as a buffer */
|
||||
|
||||
static int
|
||||
mmap_buffer_getbuf(mmap_object *self, PyBuffer *view, int flags)
|
||||
mmap_buffer_getbuf(mmap_object *self, Py_buffer *view, int flags)
|
||||
{
|
||||
CHECK_VALID(-1);
|
||||
if (PyBuffer_FillInfo(view, self->data, self->size,
|
||||
|
|
@ -612,7 +612,7 @@ mmap_buffer_getbuf(mmap_object *self, PyBuffer *view, int flags)
|
|||
}
|
||||
|
||||
static void
|
||||
mmap_buffer_releasebuf(mmap_object *self, PyBuffer *view)
|
||||
mmap_buffer_releasebuf(mmap_object *self, Py_buffer *view)
|
||||
{
|
||||
self->exports--;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue