summaryrefslogtreecommitdiff
path: root/vapigen
diff options
context:
space:
mode:
authorEvan Nemerson <evan@coeus-group.com>2012-06-22 12:30:16 -0700
committerEvan Nemerson <evan@coeus-group.com>2012-06-22 12:30:16 -0700
commit7ae4962bb73de5acddae26fa1568ac83e9f65ed3 (patch)
tree4120da39b2a2cbc0822be592caa3f9e69fe669a2 /vapigen
parent07d3bbf32e546b432eee11bd802999594fa733ef (diff)
downloadvala-7ae4962bb73de5acddae26fa1568ac83e9f65ed3.tar.gz
vapigen: support deprecated namespace annotations in metadata files
Diffstat (limited to 'vapigen')
-rw-r--r--vapigen/valagidlparser.vala8
1 files changed, 8 insertions, 0 deletions
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index 5aad01468..63fca0efc 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]));
}
}
}