[vala] gidlparser: Support returns_floating_reference metadata
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] gidlparser: Support returns_floating_reference metadata
- Date: Fri, 8 Jul 2016 13:51:53 +0000 (UTC)
commit c2b050c372f092eea65560cb1b5e7f6572e28951
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Jul 8 15:41:49 2016 +0200
gidlparser: Support returns_floating_reference metadata
vapigen/valagidlparser.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index 563eabe..f233019 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -2272,6 +2272,11 @@ public class Vala.GIdlParser : CodeVisitor {
if (eval (nv[1]) == "1") {
m.set_attribute ("DestroysInstance", true,
m.source_reference);
}
+ } else if (nv[0] == "returns_floating_reference") {
+ if (eval (nv[1]) == "1") {
+ m.set_attribute_bool ("CCode", "returns_floating_reference",
true);
+ m.return_type.value_owned = true;
+ }
} else if (nv[0] == "nullable") {
if (eval (nv[1]) == "1" && !(return_type is VoidType)) {
return_type.nullable = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]