mirror of
https://github.com/python/cpython.git
synced 2025-09-14 04:37:29 +00:00
Buffer objects would return the read or write buffer for a wrapped object when
the char buffer was requested. Now it actually returns the char buffer if available or raises a TypeError if it isn't (as is raised for the other buffer types if they are not present but requested). Not a backport candidate since it does change semantics of the buffer object (although it could be argued this is enough of a bug to bother backporting).
This commit is contained in:
parent
6ee7d01c05
commit
de3b052216
4 changed files with 85 additions and 22 deletions
|
@ -1787,6 +1787,7 @@ static PyBufferProcs array_as_buffer = {
|
|||
(readbufferproc)array_buffer_getreadbuf,
|
||||
(writebufferproc)array_buffer_getwritebuf,
|
||||
(segcountproc)array_buffer_getsegcount,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static PyObject *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue