From 3e2b7171bf29f80c06805e60741b5b813376294e Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 9 Nov 2010 09:32:19 +0000 Subject: Issue #10359: Remove ";" after function definition, invalid in ISO C --- Lib/distutils/tests/test_build_ext.py | 2 +- Modules/_testcapimodule.c | 2 +- Objects/weakrefobject.c | 2 +- Python/import.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index 46ac9aa..203cbc9 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -318,7 +318,7 @@ class BuildExtTestCase(TempdirManager, def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void PyInit_foo(void) {};\n') + self.write_file(c_file, 'void PyInit_foo(void) {}\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 597a88b..8413641 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -1792,7 +1792,7 @@ test_unicode_compare_with_ascii(PyObject *self) { return NULL; } Py_RETURN_NONE; -}; +} /* This is here to provide a docstring for test_descr. */ static PyObject * diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c index 7a2c1bd..13323cf 100644 --- a/Objects/weakrefobject.c +++ b/Objects/weakrefobject.c @@ -583,7 +583,7 @@ proxy_iternext(PyWeakReference *proxy) } -WRAP_METHOD(proxy_bytes, "__bytes__"); +WRAP_METHOD(proxy_bytes, "__bytes__") static PyMethodDef proxy_methods[] = { diff --git a/Python/import.c b/Python/import.c index 523a1c0..85ead86 100644 --- a/Python/import.c +++ b/Python/import.c @@ -3101,7 +3101,7 @@ imp_make_magic(long magic) buf[3] = (char) ((magic >> 24) & 0xff); return PyBytes_FromStringAndSize(buf, 4); -}; +} static PyObject * imp_get_magic(PyObject *self, PyObject *noargs) -- cgit v0.12