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

index a186b01257ce2928a64d68c8542105b486d535fe..6368a05f737f7092ec39c8a0d68f1bb6ed63b674 100644 (file)
@@ -110,7 +110,14 @@ public abstract class Vala.Symbol : CodeNode {
        /**
         * Specifies the replacement if this symbol has been deprecated.
         */
-       public string? replacement { get; set; default = null; }
+       public string? replacement {
+               owned get {
+                       return get_attribute_string ("Deprecated", "replacement");
+               }
+               set {
+                       set_attribute_string ("Deprecated", "replacement", value);
+               }
+       }
 
        /**
         * Specifies whether this symbol is experimental.
@@ -499,10 +506,6 @@ public abstract class Vala.Symbol : CodeNode {
                if (attr.name != "Deprecated") {
                        return;
                }
-
-               if (attr.has_argument ("replacement")) {
-                       replacement = attr.get_string ("replacement");
-               }
        }
 
        /**