mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
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:
parent
3f993c3b52
commit
8ae62b6094
16 changed files with 145 additions and 85 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue