[vala/wip/attributes-clean: 17/32] On-demand Symbol.deprecated_since



commit 1640c6c8819e690d1c9fca0985d85e62618bcf93
Author: Luca Bruno <lucabru src gnome org>
Date:   Thu Jul 7 15:46:42 2011 +0200

    On-demand Symbol.deprecated_since

 vala/valasymbol.vala |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/vala/valasymbol.vala b/vala/valasymbol.vala
index c19819a..a186b01 100644
--- a/vala/valasymbol.vala
+++ b/vala/valasymbol.vala
@@ -98,7 +98,14 @@ public abstract class Vala.Symbol : CodeNode {
 	/**
 	 * Specifies what version this symbol has been deprecated since.
 	 */
-	public string? deprecated_since { get; set; default = null; }
+	public string? deprecated_since {
+		owned get {
+			return get_attribute_string ("Deprecated", "since");
+		}
+		set {
+			set_attribute_string ("Deprecated", "since", value);
+		}
+	}
 
 	/**
 	 * Specifies the replacement if this symbol has been deprecated.
@@ -493,9 +500,6 @@ public abstract class Vala.Symbol : CodeNode {
 			return;
 		}
 
-		if (attr.has_argument ("since")) {
-			deprecated_since = attr.get_string ("since");
-		}
 		if (attr.has_argument ("replacement")) {
 			replacement = attr.get_string ("replacement");
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]