[vala/0.40] girparser/gidlparser: "value_owned = true" by default for property types
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.40] girparser/gidlparser: "value_owned = true" by default for property types
- Date: Wed, 9 Oct 2019 17:33:05 +0000 (UTC)
commit 03b060ec85765c06034d8754a8fb3149a846242f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Sep 2 09:40:40 2019 +0200
girparser/gidlparser: "value_owned = true" by default for property types
This represents an internal implementation detail which is available from
vala sources and it does not effect the ownership of property accessors.
vala/valagirparser.vala | 3 +++
vapigen/valagidlparser.vala | 3 +++
2 files changed, 6 insertions(+)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index eaff9f39b..369010e73 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -996,6 +996,9 @@ public class Vala.GirParser : CodeVisitor {
prop.set_accessor = new PropertyAccessor (false,
(construct_only != "1") && (writable == "1"), (construct_only == "1") || (construct_ == "1"),
prop.property_type.copy (), null, null);
}
+ // there is no information about the internal ownership so assume
`owned` as default
+ prop.property_type.value_owned = true;
+
// find virtual/abstract accessors to handle abstract properties
properly
Node getter = null;
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index bb3c4bb86..3b4506f76 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -2737,6 +2737,9 @@ public class Vala.GIdlParser : CodeVisitor {
}
}
+ // there is no information about the internal ownership so assume `owned` as default
+ prop.property_type.value_owned = true;
+
var attributes = get_attributes ("%s:%s".printf (get_cname (current_data_type), node.name));
if (attributes != null) {
foreach (string attr in attributes) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]