Commit 8cadf009 authored by Georg Brandl's avatar Georg Brandl

Re #18521: fix not-quite-C syntax that works only because the PyXXX_Check are...

Re #18521: fix not-quite-C syntax that works only because the PyXXX_Check are macros defined with () around them.
parent f433fe00
...@@ -4202,7 +4202,7 @@ Array_subscript(PyObject *_self, PyObject *item) ...@@ -4202,7 +4202,7 @@ Array_subscript(PyObject *_self, PyObject *item)
i += self->b_length; i += self->b_length;
return Array_item(_self, i); return Array_item(_self, i);
} }
else if PySlice_Check(item) { else if (PySlice_Check(item)) {
StgDictObject *stgdict, *itemdict; StgDictObject *stgdict, *itemdict;
PyObject *proto; PyObject *proto;
PyObject *np; PyObject *np;
......
...@@ -1815,7 +1815,7 @@ ndarray_subscript(NDArrayObject *self, PyObject *key) ...@@ -1815,7 +1815,7 @@ ndarray_subscript(NDArrayObject *self, PyObject *key)
if (init_slice(base, key, 0) < 0) if (init_slice(base, key, 0) < 0)
goto err_occurred; goto err_occurred;
} }
else if PyTuple_Check(key) { else if (PyTuple_Check(key)) {
/* multi-dimensional slice */ /* multi-dimensional slice */
PyObject *tuple = key; PyObject *tuple = key;
Py_ssize_t i, n; Py_ssize_t i, n;
......
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