]> granicus.if.org Git - python/commitdiff
Re #18521: fix not-quite-C syntax that works only because the PyXXX_Check are macros...
authorGeorg Brandl <georg@python.org>
Mon, 14 Oct 2013 04:46:12 +0000 (06:46 +0200)
committerGeorg Brandl <georg@python.org>
Mon, 14 Oct 2013 04:46:12 +0000 (06:46 +0200)
Modules/_ctypes/_ctypes.c
Modules/_testbuffer.c

index a93290e39cd7d08a09c4562e9171180488fc50aa..74522023542d5e0a4b96fae9bf669b213068fb92 100644 (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;
index a4e1643a0dd8654a4e25e3b9fbaeb1b9300a278c..0c6ef16f175f16bd7470cd0872eed4e5b130d993 100644 (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;