From: Jürg Billeter Date: Thu, 21 Jul 2011 19:20:02 +0000 (+0200) Subject: dova: Do not use owned setters for public fields X-Git-Tag: 0.13.2~125 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b58ebdab3590f13091e105cfdb842da0062bc666;p=thirdparty%2Fvala.git dova: Do not use owned setters for public fields --- diff --git a/vala/valaclass.vala b/vala/valaclass.vala index 92ca064f8..6c1cc6e66 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;