[vala/wip/attributes-clean: 20/32] On-demand Symbol.experimental
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/attributes-clean: 20/32] On-demand Symbol.experimental
- Date: Sat, 9 Jul 2011 20:55:18 +0000 (UTC)
commit 93b6432b0b3d096114383ddd10662599f68a26c4
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]