From 2f89aa678549eae1557247a36ed9194af9a4f7b7 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 2 Aug 2008 21:02:48 +0000 Subject: #2538: bytes objects can only provide read-only buffers --- Objects/bytesobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/bytesobject.c') diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 471d09c7ec..eeae0ff589 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -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 = { -- cgit v1.2.1