diff options
author | Luca Bruno <lucabru@src.gnome.org> | 2011-07-07 15:44:10 +0200 |
---|---|---|
committer | Luca Bruno <lucabru@src.gnome.org> | 2011-08-01 18:17:05 +0200 |
commit | 384c5607b79eba5695d796f5fe7f067a4845302b (patch) | |
tree | 83627d6afcdcacee585cf738437d07c8301ec393 /vala/valasymbol.vala | |
parent | 34a66ad2dfc4006052dad3f0d452b21045c5ed6f (diff) | |
download | vala-384c5607b79eba5695d796f5fe7f067a4845302b.tar.gz |
On-demand Symbol.deprecated
Diffstat (limited to 'vala/valasymbol.vala')
-rw-r--r-- | vala/valasymbol.vala | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/vala/valasymbol.vala b/vala/valasymbol.vala index 5b1ef12a9..c19819aa8 100644 --- a/vala/valasymbol.vala +++ b/vala/valasymbol.vala @@ -82,7 +82,18 @@ public abstract class Vala.Symbol : CodeNode { /** * Specifies whether this symbol has been deprecated. */ - public bool deprecated { get; set; default = false; } + public bool deprecated { + get { + if (_deprecated == null) { + _deprecated = get_attribute ("Deprecated") != null; + } + return _deprecated; + } + set { + _deprecated = value; + set_attribute ("Deprecated", _deprecated); + } + } /** * Specifies what version this symbol has been deprecated since. @@ -194,6 +205,7 @@ public abstract class Vala.Symbol : CodeNode { private weak Scope _owner; private Scope _scope; private string? _gir_name = null; + private bool? _deprecated; public Symbol (string? name, SourceReference? source_reference, Comment? comment = null) { this.name = name; @@ -481,8 +493,6 @@ public abstract class Vala.Symbol : CodeNode { return; } - deprecated = true; - if (attr.has_argument ("since")) { deprecated_since = attr.get_string ("since"); } |