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:
Travis E. Oliphant 2007-09-23 02:00:13 +00:00
parent 3f993c3b52
commit 8ae62b6094
16 changed files with 145 additions and 85 deletions

View file

@ -367,7 +367,7 @@ w_object(PyObject *v, WFILE *p)
/* Write unknown buffer-style objects as a string */
char *s;
PyBufferProcs *pb = v->ob_type->tp_as_buffer;
PyBuffer view;
Py_buffer view;
if ((*pb->bf_getbuffer)(v, &view, PyBUF_SIMPLE) != 0) {
w_byte(TYPE_UNKNOWN, p);
p->error = 1;