diff options
author | Travis E. Oliphant <oliphant@enthought.com> | 2007-09-23 02:00:13 (GMT) |
---|---|---|
committer | Travis E. Oliphant <oliphant@enthought.com> | 2007-09-23 02:00:13 (GMT) |
commit | 8ae62b60940ae0f33b1792703f3255e9c6a6a88a (patch) | |
tree | a7046041eb8d6943b159827500114aa855f69678 /Python | |
parent | 3f993c3b52f9799a010b889d20f1bc129eb89704 (diff) | |
download | cpython-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 'Python')
-rw-r--r-- | Python/getargs.c | 6 | ||||
-rw-r--r-- | Python/marshal.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index 8608684..dc1bae0 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -1211,7 +1211,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags, PyBufferProcs *pb = arg->ob_type->tp_as_buffer; int count; int temp=-1; - PyBuffer view; + Py_buffer view; if (pb == NULL || pb->bf_getbuffer == NULL || @@ -1242,7 +1242,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags, char **p = va_arg(*p_va, char **); PyBufferProcs *pb = arg->ob_type->tp_as_buffer; int count; - PyBuffer view; + Py_buffer view; if (*format++ != '#') return converterr( @@ -1286,7 +1286,7 @@ convertbuffer(PyObject *arg, void **p, char **errmsg) { PyBufferProcs *pb = arg->ob_type->tp_as_buffer; Py_ssize_t count; - PyBuffer view; + Py_buffer view; *errmsg = NULL; *p = NULL; diff --git a/Python/marshal.c b/Python/marshal.c index 1ec33bd..c488f27 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -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; |