Change PyBuffer to Py_buffer to be consistent with other non-object structures like Py_complex. Add some more functionality to the memoryview object.
diff --git a/Include/memoryobject.h b/Include/memoryobject.h
index 1713e8f..4426cd8 100644
--- a/Include/memoryobject.h
+++ b/Include/memoryobject.h
@@ -10,7 +10,7 @@
typedef struct {
PyObject_HEAD
PyObject *base;
- PyBuffer view;
+ Py_buffer view;
} PyMemoryViewObject;
@@ -57,7 +57,7 @@
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 */