Commit b35f1287 authored by Neal Norwitz's avatar Neal Norwitz

At least one of the buildbots was complaining about newview being used

without being initialized.  Also make the code conform to the comment and
return the new object.  This code needs a test!
parent e43bd62b
......@@ -513,12 +513,11 @@ memory_subscript(PyMemoryViewObject *self, PyObject *key)
else {
/* Return a new memory-view object */
Py_buffer newview;
PyMemoryView_FromMemory(&newview);
memset(&newview, 0, sizeof(newview));
return PyMemoryView_FromMemory(&newview);
}
}
Py_INCREF(Py_NotImplemented);
return Py_NotImplemented;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment