[vala] dova: Do not use owned setters for public fields



commit b58ebdab3590f13091e105cfdb842da0062bc666
Author: JÃrg Billeter <j bitron ch>
Date:   Thu Jul 21 21:20:02 2011 +0200

    dova: Do not use owned setters for public fields

 vala/valaclass.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/vala/valaclass.vala b/vala/valaclass.vala
index 92ca064..6c1cc6e 100644
--- a/vala/valaclass.vala
+++ b/vala/valaclass.vala
@@ -296,10 +296,12 @@ public class Vala.Class : ObjectTypeSymbol {
 
 			var get_type = prop.property_type.copy ();
 			get_type.value_owned = true;
+			var set_type = prop.property_type.copy ();
+			set_type.value_owned = false;
 
 			prop.get_accessor = new PropertyAccessor (true, false, false, get_type, null, f.source_reference);
 
-			prop.set_accessor = new PropertyAccessor (false, true, false, prop.property_type.copy (), null, f.source_reference);
+			prop.set_accessor = new PropertyAccessor (false, true, false, set_type, null, f.source_reference);
 
 			f.name = "_%s".printf (f.name);
 			f.access = SymbolAccessibility.PRIVATE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]