[vala/staging] girparser: Default to "virtual" instead of "abstract" for interface-property
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] girparser: Default to "virtual" instead of "abstract" for interface-property
- Date: Fri, 8 Dec 2017 15:35:13 +0000 (UTC)
commit 4c0791f5ceb6b0e8993b55fb37f109e6ec89225c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Dec 8 16:28:57 2017 +0100
girparser: Default to "virtual" instead of "abstract" for interface-property
vala/valagirparser.vala | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 1715ad1..ad7f538 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -2971,7 +2971,11 @@ public class Vala.GirParser : CodeVisitor {
Property parse_property () {
start_element ("property");
push_node (element_get_name().replace ("-", "_"), false);
- bool is_abstract = metadata.get_bool (ArgumentType.ABSTRACT, current.parent.symbol is
Interface);
+ bool is_abstract = metadata.get_bool (ArgumentType.ABSTRACT);
+ bool is_virtual = false;
+ if (!is_abstract) {
+ is_virtual = metadata.get_bool (ArgumentType.VIRTUAL, current.parent.symbol is
Interface);
+ }
string transfer = reader.get_attribute ("transfer-ownership");
next ();
@@ -2987,6 +2991,7 @@ public class Vala.GirParser : CodeVisitor {
prop.access = SymbolAccessibility.PUBLIC;
prop.external = true;
prop.is_abstract = is_abstract;
+ prop.is_virtual = is_virtual;
if (no_array_length || array_null_terminated) {
prop.set_attribute_bool ("CCode", "array_length", !no_array_length);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]