mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +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
|
@ -8117,10 +8117,6 @@ static int
|
|||
unicode_buffer_getbuffer(PyUnicodeObject *self, Py_buffer *view, int flags)
|
||||
{
|
||||
|
||||
if (flags & PyBUF_CHARACTER) {
|
||||
PyErr_SetString(PyExc_SystemError, "can't use str as char buffer");
|
||||
return -1;
|
||||
}
|
||||
return PyBuffer_FillInfo(view, (void *)self->str,
|
||||
PyUnicode_GET_DATA_SIZE(self), 1, flags);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue