Kaydet (Commit) 35b7e837 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Issue #4822: fix messy indentation in memoryobject.c/.h, before we may backport it to trunk.

Reviewed on IRC by Georg Brandl, with assistance by Benjamin Peterson.
üst 771ed761
......@@ -569,8 +569,7 @@ memory_subscript(PyMemoryViewObject *self, PyObject *key)
else
ptr += view->strides[0] * result;
if (view->suboffsets != NULL &&
view->suboffsets[0] >= 0)
{
view->suboffsets[0] >= 0) {
ptr = *((char **)ptr) + view->suboffsets[0];
}
return PyBytes_FromStringAndSize(ptr, view->itemsize);
......@@ -783,9 +782,9 @@ memory_clear(PyMemoryViewObject *self)
/* As mapping */
static PyMappingMethods memory_as_mapping = {
(lenfunc)memory_length, /*mp_length*/
(binaryfunc)memory_subscript, /*mp_subscript*/
(objobjargproc)memory_ass_sub, /*mp_ass_subscript*/
(lenfunc)memory_length, /* mp_length */
(binaryfunc)memory_subscript, /* mp_subscript */
(objobjargproc)memory_ass_sub, /* mp_ass_subscript */
};
......@@ -817,7 +816,7 @@ PyTypeObject PyMemoryView_Type = {
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
&memory_as_buffer, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
memory_doc, /* tp_doc */
(traverseproc)memory_traverse, /* tp_traverse */
(inquiry)memory_clear, /* tp_clear */
......
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