summaryrefslogtreecommitdiffstats
path: root/Modules/_ctypes
diff options
context:
space:
mode:
authorTravis E. Oliphant <oliphant@enthought.com>2007-09-23 02:00:13 (GMT)
committerTravis E. Oliphant <oliphant@enthought.com>2007-09-23 02:00:13 (GMT)
commit8ae62b60940ae0f33b1792703f3255e9c6a6a88a (patch)
treea7046041eb8d6943b159827500114aa855f69678 /Modules/_ctypes
parent3f993c3b52f9799a010b889d20f1bc129eb89704 (diff)
downloadcpython-8ae62b60940ae0f33b1792703f3255e9c6a6a88a.zip
cpython-8ae62b60940ae0f33b1792703f3255e9c6a6a88a.tar.gz
cpython-8ae62b60940ae0f33b1792703f3255e9c6a6a88a.tar.bz2
Change PyBuffer to Py_buffer to be consistent with other non-object structures like Py_complex. Add some more functionality to the memoryview object.
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r--Modules/_ctypes/_ctypes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index 071f4c8..67514c0 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -740,7 +740,7 @@ CharArray_set_raw(CDataObject *self, PyObject *value)
char *ptr;
Py_ssize_t size;
int rel = 0;
- PyBuffer view;
+ Py_buffer view;
if (PyBuffer_Check(value)) {
if (PyObject_GetBuffer(value, &view, PyBUF_SIMPLE) < 0)
@@ -2083,7 +2083,7 @@ static PyMemberDef CData_members[] = {
{ NULL },
};
-static int CData_GetBuffer(PyObject *_self, PyBuffer *view, int flags)
+static int CData_GetBuffer(PyObject *_self, Py_buffer *view, int flags)
{
CDataObject *self = (CDataObject *)_self;
return PyBuffer_FillInfo(view, self->b_ptr, self->b_size, 0, flags);