[vala/staging] girparser: Add support for string "ctype" metadata
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] girparser: Add support for string "ctype" metadata
- Date: Tue, 7 May 2019 13:49:10 +0000 (UTC)
commit 59eea90d2383e012a20a5e5b888071ea97d161c4
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue May 7 15:44:37 2019 +0200
girparser: Add support for string "ctype" metadata
https://gitlab.gnome.org/GNOME/vala/issues/793
vala/valagirparser.vala | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 0a93cecce..30daab5ba 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -89,7 +89,8 @@ public class Vala.GirParser : CodeVisitor {
FINISH_VFUNC_NAME,
NO_ACCESSOR_METHOD,
CNAME,
- DELEGATE_TARGET;
+ DELEGATE_TARGET,
+ CTYPE;
public static ArgumentType? from_string (string name) {
var enum_class = (EnumClass) typeof(ArgumentType).class_ref ();
@@ -2618,7 +2619,11 @@ public class Vala.GirParser : CodeVisitor {
start_element ("type");
}
- ctype = reader.get_attribute("c:type");
+ if (metadata.has_argument (ArgumentType.CTYPE)) {
+ ctype = metadata.get_string (ArgumentType.CTYPE);
+ } else {
+ ctype = reader.get_attribute("c:type");
+ }
next ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]