diff options
Diffstat (limited to 'src/if_python3.c')
-rw-r--r-- | src/if_python3.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/if_python3.c b/src/if_python3.c index e8ab44f3be..d93d633186 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -1236,9 +1236,7 @@ BufferSubscript(PyObject *self, PyObject* idx) (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count, &start, &stop, &step, &slicelen) < 0) - { return NULL; - } return BufferSlice((BufferObject *)(self), start, stop); } else @@ -1268,9 +1266,7 @@ BufferAsSubscript(PyObject *self, PyObject* idx, PyObject* val) (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count, &start, &stop, &step, &slicelen) < 0) - { return -1; - } return RBAsSlice((BufferObject *)(self), start, stop, val, 1, (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count, NULL); @@ -1352,9 +1348,7 @@ RangeSubscript(PyObject *self, PyObject* idx) ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1, &start, &stop, &step, &slicelen) < 0) - { return NULL; - } return RangeSlice((RangeObject *)(self), start, stop); } else @@ -1371,7 +1365,8 @@ RangeAsSubscript(PyObject *self, PyObject *idx, PyObject *val) { long n = PyLong_AsLong(idx); return RangeAsItem(self, n, val); - } else if (PySlice_Check(idx)) + } + else if (PySlice_Check(idx)) { Py_ssize_t start, stop, step, slicelen; @@ -1379,9 +1374,7 @@ RangeAsSubscript(PyObject *self, PyObject *idx, PyObject *val) ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1, &start, &stop, &step, &slicelen) < 0) - { return -1; - } return RangeAsSlice(self, start, stop, val); } else |