[vala/0.36] girparser: Allow change of parameter names



commit bcc8a7759cea6a4f2805c4b718d3b2e35d02c70a
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Dec 2 18:31:03 2017 +0100

    girparser: Allow change of parameter names

 vala/valagirparser.vala |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index fb811c8..192ac1a 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -2425,7 +2425,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;
                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]