Re #18521: fix not-quite-C syntax that works only because the PyXXX_Check are macros defined with () around them.

This commit is contained in:
Georg Brandl 2013-10-14 06:46:12 +02:00
parent 33fc6d6040
commit 782952b8fe
2 changed files with 2 additions and 2 deletions

View File

@ -4202,7 +4202,7 @@ Array_subscript(PyObject *_self, PyObject *item)
i += self->b_length;
return Array_item(_self, i);
}
else if PySlice_Check(item) {
else if (PySlice_Check(item)) {
StgDictObject *stgdict, *itemdict;
PyObject *proto;
PyObject *np;

View File

@ -1815,7 +1815,7 @@ ndarray_subscript(NDArrayObject *self, PyObject *key)
if (init_slice(base, key, 0) < 0)
goto err_occurred;
}
else if PyTuple_Check(key) {
else if (PyTuple_Check(key)) {
/* multi-dimensional slice */
PyObject *tuple = key;
Py_ssize_t i, n;