diff Objects/bytesobject.c @ 48623:bf50085fbcd3

#2538: bytes objects can only provide read-only buffers
author Antoine Pitrou <solipsis@pitrou.net>
date Sat, 02 Aug 2008 21:02:48 +0000
parents 2284fa89ab08
children 85b67fb5672b
line wrap: on
line diff
--- a/Objects/bytesobject.c	Sat Aug 02 16:34:27 2008 +0000
+++ b/Objects/bytesobject.c	Sat Aug 02 21:02:48 2008 +0000
@@ -965,7 +965,7 @@
 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 = {