[vala] vapigen: support deprecated namespace annotations in metadata files
- From: Evan Nemerson <evann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] vapigen: support deprecated namespace annotations in metadata files
- Date: Fri, 22 Jun 2012 19:37:36 +0000 (UTC)
commit 7ae4962bb73de5acddae26fa1568ac83e9f65ed3
Author: Evan Nemerson <evan coeus-group com>
Date: Fri Jun 22 12:30:16 2012 -0700
vapigen: support deprecated namespace annotations in metadata files
vapigen/valagidlparser.vala | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index 5aad014..63fca0e 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -505,6 +505,14 @@ public class Vala.GIdlParser : CodeVisitor {
} else if (nv[0] == "gir_version") {
ns.source_reference.file.gir_version = eval (nv[1]);
ns.set_attribute_string ("CCode", "gir_version", eval (nv[1]));
+ } else if (nv[0] == "deprecated") {
+ if (eval (nv[1]) == "1") {
+ ns.set_attribute ("Deprecated", true);
+ }
+ } else if (nv[0] == "replacement") {
+ ns.set_attribute_string ("Deprecated", "replacement", eval (nv[1]));
+ } else if (nv[0] == "deprecated_since") {
+ ns.set_attribute_string ("Deprecated", "since", eval (nv[1]));
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]