Index: find-modules/sip_generator.py =================================================================== --- find-modules/sip_generator.py +++ find-modules/sip_generator.py @@ -522,18 +522,19 @@ modifying_rule = self.rules.function_rules().apply(container, function, sip) pad = " " * (level * 4) if sip["name"]: + decl1 = "" + if modifying_rule: + decl1 += pad + "// Modified {} (by {}):\n".format(SipGenerator.describe(function), modifying_rule) + for modifying_rule in parameter_modifying_rules: + decl1 += pad + modifying_rule + decl = "" # # Any method-related code (%MethodCode, %VirtualCatcherCode, VirtualCallCode # or other method-related directives)? # - self.rules.methodcode(function, sip) - decl = "" + modifying_rule = self.rules.methodcode(function, sip) if modifying_rule: - decl += "// Modified {} (by {}):\n".format(SipGenerator.describe(function), modifying_rule) + pad - decl += pad.join(parameter_modifying_rules) - if parameter_modifying_rules: - decl += pad - + decl1 += pad + "// Modified {} (by {}):\n".format(SipGenerator.describe(function), modifying_rule) decl += sip["name"] + "(" + ", ".join(sip["parameters"]) + ")" if sip["fn_result"]: decl = sip["fn_result"] + " " + decl @@ -544,6 +545,7 @@ decl += " /" + ",".join(sip["annotations"]) + "/" decl += ";\n" decl += sip["code"] + decl = decl1 + decl else: decl = pad + "// Discarded {} (by {})\n".format(SipGenerator.describe(function), modifying_rule) return decl