[Python-checkins] cpython: Re #18521: fix not-quite-C syntax that works only because the PyXXX_Check are
georg.brandl
python-checkins at python.org
Mon Oct 14 06:45:24 CEST 2013
http://hg.python.org/cpython/rev/eaeaed43ff1c
changeset: 86356:eaeaed43ff1c
user: Georg Brandl <georg at python.org>
date: Mon Oct 14 06:46:12 2013 +0200
summary:
Re #18521: fix not-quite-C syntax that works only because the PyXXX_Check are macros defined with () around them.
files:
Modules/_ctypes/_ctypes.c | 2 +-
Modules/_testbuffer.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -4202,7 +4202,7 @@
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;
diff --git a/Modules/_testbuffer.c b/Modules/_testbuffer.c
--- a/Modules/_testbuffer.c
+++ b/Modules/_testbuffer.c
@@ -1815,7 +1815,7 @@
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;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list