mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
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. ........
This commit is contained in:
parent
cbb98950db
commit
566facd39b
3 changed files with 14 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue