]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Allow change of parameter names
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 2 Dec 2017 17:31:03 +0000 (18:31 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 5 Dec 2017 15:01:05 +0000 (16:01 +0100)
vala/valagirparser.vala

index 790a1b244e13de449a0c93d50b34097b273fa8bf..c4a6bf9214fdd3b387669fa14389550543e1b56a 100644 (file)
@@ -2427,7 +2427,10 @@ public class Vala.GirParser : CodeVisitor {
                        Report.error (get_current_src (), "expected start element of `parameter' or `instance-parameter'");
                }
                start_element (element_type);
-               string name = reader.get_attribute ("name");
+               var name = metadata.get_string (ArgumentType.NAME);
+               if (name == null) {
+                       name = reader.get_attribute ("name");
+               }
                if (name == null) {
                        name = default_name;
                }