[vala/wip/attributes-clean: 18/32] On-demand Symbol.replacement
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/attributes-clean: 18/32] On-demand Symbol.replacement
- Date: Sat, 9 Jul 2011 20:55:08 +0000 (UTC)
commit c397c017c0e00511f1457e6f1c3ce8fea9db73db
Author: Luca Bruno <lucabru src gnome org>
Date: Thu Jul 7 15:49:16 2011 +0200
On-demand Symbol.replacement
vala/valasymbol.vala | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/vala/valasymbol.vala b/vala/valasymbol.vala
index a186b01..6368a05 100644
--- a/vala/valasymbol.vala
+++ b/vala/valasymbol.vala
@@ -110,7 +110,14 @@ public abstract class Vala.Symbol : CodeNode {
/**
* Specifies the replacement if this symbol has been deprecated.
*/
- public string? replacement { get; set; default = null; }
+ public string? replacement {
+ owned get {
+ return get_attribute_string ("Deprecated", "replacement");
+ }
+ set {
+ set_attribute_string ("Deprecated", "replacement", value);
+ }
+ }
/**
* Specifies whether this symbol is experimental.
@@ -499,10 +506,6 @@ public abstract class Vala.Symbol : CodeNode {
if (attr.name != "Deprecated") {
return;
}
-
- if (attr.has_argument ("replacement")) {
- replacement = attr.get_string ("replacement");
- }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]