[vala/switch-to-gir: 47/47] girparser: Fix processing deprecation.
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/switch-to-gir: 47/47] girparser: Fix processing deprecation.
- Date: Thu, 6 Jan 2011 11:53:30 +0000 (UTC)
commit 981b9ec4af336f100c409c80b97155643db5b3c2
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 d5c2d63..51afc04 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]