]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
On-demand Symbol.deprecated_since
authorLuca Bruno <lucabru@src.gnome.org>
Thu, 7 Jul 2011 13:46:42 +0000 (15:46 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Mon, 1 Aug 2011 16:17:05 +0000 (18:17 +0200)
vala/valasymbol.vala

index c19819aa8c8451ee9b8d207345acde3ada002a96..a186b01257ce2928a64d68c8542105b486d535fe 100644 (file)
@@ -98,7 +98,14 @@ public abstract class Vala.Symbol : CodeNode {
        /**
         * Specifies what version this symbol has been deprecated since.
         */
-       public string? deprecated_since { get; set; default = null; }
+       public string? deprecated_since {
+               owned get {
+                       return get_attribute_string ("Deprecated", "since");
+               }
+               set {
+                       set_attribute_string ("Deprecated", "since", value);
+               }
+       }
 
        /**
         * Specifies the replacement if this symbol has been deprecated.
@@ -493,9 +500,6 @@ public abstract class Vala.Symbol : CodeNode {
                        return;
                }
 
-               if (attr.has_argument ("since")) {
-                       deprecated_since = attr.get_string ("since");
-               }
                if (attr.has_argument ("replacement")) {
                        replacement = attr.get_string ("replacement");
                }