summaryrefslogtreecommitdiffstats
path: root/Objects/memoryobject.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-01-18 19:06:09 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-01-18 19:06:09 (GMT)
commit566facd39b90595b1b7ab61a26c77e426ac22c73 (patch)
tree002b459ea188474c49d112b18f98469ca15bfffc /Objects/memoryobject.c
parentcbb98950db66e17ffb3219d1d19a001a6b4020cc (diff)
downloadcpython-566facd39b90595b1b7ab61a26c77e426ac22c73.zip
cpython-566facd39b90595b1b7ab61a26c77e426ac22c73.tar.gz
cpython-566facd39b90595b1b7ab61a26c77e426ac22c73.tar.bz2
Merged revisions 88097 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88097 | antoine.pitrou | 2011-01-18 19:57:52 +0100 (mar., 18 janv. 2011) | 4 lines Issue #10451: memoryview objects could allow to mutate a readable buffer. Initial patch by Ross Lagerwall. ........
Diffstat (limited to 'Objects/memoryobject.c')
-rw-r--r--Objects/memoryobject.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
index f5dacb0..9b77ea7 100644
--- a/Objects/memoryobject.c
+++ b/Objects/memoryobject.c
@@ -34,9 +34,6 @@ static int
memory_getbuf(PyMemoryViewObject *self, Py_buffer *view, int flags)
{
int res = 0;
- /* XXX for whatever reason fixing the flags seems necessary */
- if (self->view.readonly)
- flags &= ~PyBUF_WRITABLE;
if (self->view.obj != NULL)
res = PyObject_GetBuffer(self->view.obj, view, flags);
if (view)