summaryrefslogtreecommitdiff
path: root/vapigen/valavapigen.vala
diff options
context:
space:
mode:
authorLuca Bruno <lucabru@src.gnome.org>2010-10-31 15:16:32 -0700
committerEvan Nemerson <evan@coeus-group.com>2010-11-08 01:43:19 -0800
commitc1bc467f0aa37d21c27a97099cd747f0c050aeb1 (patch)
tree84b2a2587a40db9ee5b53173fa3914c89a65c0db /vapigen/valavapigen.vala
parent158f9070c22b16e886c77585118850b8e32611cd (diff)
downloadvala-c1bc467f0aa37d21c27a97099cd747f0c050aeb1.tar.gz
girparser: Add metadata stack while parsing the gir, generalize merging
Diffstat (limited to 'vapigen/valavapigen.vala')
-rw-r--r--vapigen/valavapigen.vala10
1 files changed, 9 insertions, 1 deletions
diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala
index 055765f5d..2968b0ae1 100644
--- a/vapigen/valavapigen.vala
+++ b/vapigen/valavapigen.vala
@@ -160,8 +160,16 @@ class Vala.VAPIGen : Object {
// interface writer ignores external packages
foreach (SourceFile file in context.get_source_files ()) {
- if (!file.filename.has_suffix (".vapi") && file.filename in sources) {
+ if (file.filename.has_suffix (".vapi")) {
+ continue;
+ }
+ if (file.filename in sources) {
file.file_type = SourceFileType.SOURCE;
+ } else if (file.filename.has_suffix (".metadata")) {
+ string gir_filename = "%s.gir".printf (file.filename.ndup (file.filename.length - ".metadata".length));
+ if (gir_filename in sources) {
+ file.file_type = SourceFileType.SOURCE;
+ }
}
}