mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Eliminate use of PyBUF_CHARACTER flag which is no longer part of the buffer interface. Fix up array module to export the correct format for wide-builds.
This commit is contained in:
parent
d417a154e4
commit
ddacf96868
5 changed files with 20 additions and 23 deletions
|
|
@ -236,7 +236,7 @@ PyObject_AsCharBuffer(PyObject *obj,
|
|||
"expected an object with the buffer interface");
|
||||
return -1;
|
||||
}
|
||||
if ((*pb->bf_getbuffer)(obj, &view, PyBUF_CHARACTER)) return -1;
|
||||
if ((*pb->bf_getbuffer)(obj, &view, PyBUF_SIMPLE)) return -1;
|
||||
|
||||
*buffer = view.buf;
|
||||
*buffer_len = view.len;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue