[vala] gidlparser: Support transfer_container metadata for arrays
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] gidlparser: Support transfer_container metadata for arrays
- Date: Mon, 23 Nov 2015 13:45:40 +0000 (UTC)
commit da27d783ded29d27ee61bbe04a5a0dbb1dd10d33
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Nov 23 14:38:24 2015 +0100
gidlparser: Support transfer_container metadata for arrays
vapigen/valagidlparser.vala | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index f89885f..9bced0b 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -2261,6 +2261,13 @@ public class Vala.GIdlParser : CodeVisitor {
if (eval (nv[1]) == "1") {
return_type.value_owned = true;
}
+ } else if (nv[0] == "transfer_container") {
+ if (eval (nv[1]) == "1") {
+ return_type.value_owned = true;
+ if (return_type is ArrayType) {
+ ((ArrayType) return_type).element_type.value_owned =
false;
+ }
+ }
} else if (nv[0] == "destroys_instance") {
if (eval (nv[1]) == "1") {
m.set_attribute ("DestroysInstance", true,
m.source_reference);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]