@@ -56,7 +56,7 @@ PyMemoryView_FromObject(PyObject *base)
5656 if (mview == NULL ) return NULL ;
5757
5858 mview -> base = NULL ;
59- if (PyObject_GetBuffer (base , & (mview -> view ), PyBUF_FULL ) < 0 ) {
59+ if (PyObject_GetBuffer (base , & (mview -> view ), PyBUF_FULL_RO ) < 0 ) {
6060 Py_DECREF (mview );
6161 return NULL ;
6262 }
@@ -204,9 +204,9 @@ _indirect_copy_nd(char *dest, Py_buffer *view, char fort)
204204 a contiguous buffer if it is not. The view will point to
205205 the shadow buffer which can be written to and then
206206 will be copied back into the other buffer when the memory
207- view is de-allocated. While the shadow buffer is
208- being used, it will have an exclusive write lock on
209- the original buffer.
207+ view is de-allocated. While the shadow buffer is
208+ being used, it will have an exclusive write lock on
209+ the original buffer.
210210 */
211211
212212PyObject *
@@ -528,7 +528,7 @@ memory_subscript(PyMemoryViewObject *self, PyObject *key)
528528 /* Return a new memory-view object */
529529 Py_buffer newview ;
530530 memset (& newview , 0 , sizeof (newview ));
531- /* XXX: This needs to be fixed so it
531+ /* XXX: This needs to be fixed so it
532532 actually returns a sub-view
533533 */
534534 return PyMemoryView_FromMemory (& newview );
0 commit comments