]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
dova: Do not use owned setters for public fields
authorJürg Billeter <j@bitron.ch>
Thu, 21 Jul 2011 19:20:02 +0000 (21:20 +0200)
committerJürg Billeter <j@bitron.ch>
Thu, 21 Jul 2011 19:21:19 +0000 (21:21 +0200)
vala/valaclass.vala

index 92ca064f8a7267ab138269b2fdbcba5ff919b809..6c1cc6e66114abccc9425ab539ebbe7c2b1cfb9f 100644 (file)
@@ -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;