[vala] D-Bus: Check ownership for property getters in clients
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Subject: [vala] D-Bus: Check ownership for property getters in clients
- Date: Mon, 15 Jun 2009 12:24:03 -0400 (EDT)
commit 4f5fd968d9e0091e46dbdce5e1695f69c4ab1e0c
Author: Jürg Billeter <j bitron ch>
Date: Mon Jun 15 18:21:35 2009 +0200
D-Bus: Check ownership for property getters in clients
Properties used in D-Bus clients require owned get accessor.
codegen/valadbusclientmodule.vala | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valadbusclientmodule.vala b/codegen/valadbusclientmodule.vala
index af5565e..30f82c5 100644
--- a/codegen/valadbusclientmodule.vala
+++ b/codegen/valadbusclientmodule.vala
@@ -1641,6 +1641,12 @@ internal class Vala.DBusClientModule : DBusModule {
string dbus_iface_name = iface.get_attribute ("DBus").get_string ("name");
+ var owned_type = prop.get_accessor.value_type.copy ();
+ owned_type.value_owned = true;
+ if (owned_type.is_disposable () && !prop.get_accessor.value_type.value_owned) {
+ Report.error (prop.get_accessor.value_type.source_reference, "Properties used in D-Bus clients require owned get accessor");
+ }
+
var array_type = prop.get_accessor.value_type as ArrayType;
CCodeDeclaration cdecl;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]