[vala/wip/attributes: 23/40] On-demand Symbol.replacement
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/attributes: 23/40] On-demand Symbol.replacement
- Date: Mon, 1 Aug 2011 17:10:57 +0000 (UTC)
commit e09eb329941c3543ec2016079c2f1563e14a10f0
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]