diff --git a/pybindgen/cppattribute.py b/pybindgen/cppattribute.py index 6bcd7eb..67a0a57 100644 --- a/pybindgen/cppattribute.py +++ b/pybindgen/cppattribute.py @@ -188,7 +188,7 @@ class CppStaticAttributeSetter(PySetter): self.after_call.write_code('return 0;') ## now generate the function itself - code_sink.writeln(("static int %s(%s *dummy PYBINDGEN_UNUSED, " + code_sink.writeln(("static int %s(%s * PYBINDGEN_UNUSED dummy, " "PyObject *value)") % (self.c_function_name, self.class_.pystruct)) code_sink.writeln('{') diff --git a/pybindgen/cppmethod.py b/pybindgen/cppmethod.py index bd9769b..439e03b 100644 --- a/pybindgen/cppmethod.py +++ b/pybindgen/cppmethod.py @@ -88,7 +88,7 @@ class CppMethod(ForwardWrapperBase): code_sink.writeln("static PyObject *") if 'METH_STATIC' in flags: - _self_name = 'dummy PYBINDGEN_UNUSED' + _self_name = 'PYBINDGEN_UNUSED dummy' else: _self_name = 'self' diff --git a/pybindgen/function.py b/pybindgen/function.py index c1188ff..685eb87 100644 --- a/pybindgen/function.py +++ b/pybindgen/function.py @@ -48,7 +48,7 @@ class Function(ForwardWrapperBase): tmp_sink = codesink.MemoryCodeSink() self.generate_body(tmp_sink) code_sink.writeln("static PyObject *") - prototype_line = ("%s(PyObject *dummy PYBINDGEN_UNUSED, " + prototype_line = ("%s(PyObject * PYBINDGEN_UNUSED dummy, " "PyObject *args, PyObject *kwargs") % (self.wrapper_actual_name,) if extra_wrapper_params: prototype_line += ", " + ", ".join(extra_wrapper_params)