[vala] girparser: Fix processing deprecation.
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] girparser: Fix processing deprecation.
- Date: Mon, 4 Apr 2011 14:19:06 +0000 (UTC)
commit bb0899d9f2d64b23ffa01a23da5726a54685bf40
Author: Luca Bruno <lucabru src gnome org>
Date: Thu Jan 6 12:22:04 2011 +0100
girparser: Fix processing deprecation.
vala/valagirparser.vala | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index eaddd1d..f84d6d7 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1063,10 +1063,13 @@ public class Vala.GirParser : CodeVisitor {
}
}
- void postprocess_symbol (Symbol sym, Metadata metadata) {
+ void postprocess_symbol (Symbol sym, Metadata metadata, Map<string,string> girdata) {
// deprecation
sym.replacement = metadata.get_string (ArgumentType.REPLACEMENT);
- sym.deprecated_since = element_get_string ("deprecated-version", ArgumentType.DEPRECATED_SINCE);
+ sym.deprecated_since = metadata.get_string (ArgumentType.DEPRECATED_SINCE);
+ if (sym.deprecated_since == null) {
+ sym.deprecated_since = girdata.get ("deprecated-version");
+ }
sym.deprecated = metadata.get_bool (ArgumentType.DEPRECATED) || sym.replacement != null || sym.deprecated_since != null;
// cheader filename
@@ -1119,7 +1122,7 @@ public class Vala.GirParser : CodeVisitor {
if (!(current_symbol is Namespace && info.symbol is Method) && !info.metadata.has_argument (ArgumentType.PARENT)) {
add_symbol_to_container (container, info.symbol);
}
- postprocess_symbol (info.symbol, info.metadata);
+ postprocess_symbol (info.symbol, info.metadata, info.girdata);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]