mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Delete bufferobject.[ch].
This will undoubtedly require Windows build file changes too.
This commit is contained in:
parent
bae07c9baf
commit
be801acbb1
6 changed files with 9 additions and 762 deletions
|
@ -8,6 +8,8 @@ memory_getbuf(PyMemoryViewObject *self, Py_buffer *view, int flags)
|
|||
{
|
||||
if (view != NULL)
|
||||
*view = self->view;
|
||||
if (self->base == NULL)
|
||||
return 0;
|
||||
return self->base->ob_type->tp_as_buffer->bf_getbuffer(self->base, NULL,
|
||||
PyBUF_FULL);
|
||||
}
|
||||
|
@ -15,7 +17,8 @@ memory_getbuf(PyMemoryViewObject *self, Py_buffer *view, int flags)
|
|||
static void
|
||||
memory_releasebuf(PyMemoryViewObject *self, Py_buffer *view)
|
||||
{
|
||||
PyObject_ReleaseBuffer(self->base, NULL);
|
||||
if (self->base != NULL)
|
||||
PyObject_ReleaseBuffer(self->base, NULL);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(memory_doc,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue