From: Luca Bruno Date: Thu, 7 Jul 2011 13:53:34 +0000 (+0200) Subject: On-demand Symbol.experimental X-Git-Tag: 0.13.2~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49a2654fa6a00a72699ffaac5404d85586ab3378;p=thirdparty%2Fvala.git On-demand Symbol.experimental --- diff --git a/vala/valasymbol.vala b/vala/valasymbol.vala index eda4d28ef..42ffd0008 100644 --- a/vala/valasymbol.vala +++ b/vala/valasymbol.vala @@ -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; } /**