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

index eda4d28ef3b698a9a982fda8c52ddddb2464b669..42ffd00081147f14769db1297d0f96e17a076665 100644 (file)
@@ -122,7 +122,18 @@ public abstract class Vala.Symbol : CodeNode {
        /**
         * Specifies whether this symbol is experimental.
         */
-       public bool experimental { get; set; default = false; }
+       public bool experimental {
+               get {
+                       if (_experimental == null) {
+                               _experimental = get_attribute ("Experimental") != null;
+                       }
+                       return _experimental;
+               }
+               set {
+                       _experimental = value;
+                       set_attribute ("Experimental", value);
+               }
+       }
 
        /**
         * Specifies whether this symbol has been accessed.
@@ -220,6 +231,7 @@ public abstract class Vala.Symbol : CodeNode {
        private Scope _scope;
        private string? _gir_name = null;
        private bool? _deprecated;
+       private bool? _experimental;
 
        public Symbol (string? name, SourceReference? source_reference, Comment? comment = null) {
                this.name = name;
@@ -521,8 +533,6 @@ public abstract class Vala.Symbol : CodeNode {
                if (attr.name != "Experimental") {
                        return;
                }
-
-               experimental = true;
        }
 
        /**