[vala/staging] girparser: Allow change of parameter names
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] girparser: Allow change of parameter names
- Date: Tue, 5 Dec 2017 15:01:56 +0000 (UTC)
commit 6a25ffbf1b859c8960aa0211cd58e0878007a29f
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 790a1b2..c4a6bf9 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]