mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#2538: bytes objects can only provide read-only buffers
This commit is contained in:
parent
07431a302a
commit
2f89aa6785
4 changed files with 13 additions and 8 deletions
|
@ -965,7 +965,7 @@ static int
|
|||
string_buffer_getbuffer(PyBytesObject *self, Py_buffer *view, int flags)
|
||||
{
|
||||
return PyBuffer_FillInfo(view, (void *)self->ob_sval, Py_SIZE(self),
|
||||
0, flags);
|
||||
1, flags);
|
||||
}
|
||||
|
||||
static PySequenceMethods string_as_sequence = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue