[vala/wip/attributes: 25/39] On-demand Symbol.experimental
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/attributes: 25/39] On-demand Symbol.experimental
- Date: Mon, 1 Aug 2011 16:40:00 +0000 (UTC)
commit 49a2654fa6a00a72699ffaac5404d85586ab3378
Author: Luca Bruno <lucabru src gnome org>
Date: Thu Jul 7 15:53:34 2011 +0200
On-demand Symbol.experimental
vala/valasymbol.vala | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/vala/valasymbol.vala b/vala/valasymbol.vala
index eda4d28..42ffd00 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;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]