summaryrefslogtreecommitdiff
path: root/vala/valanamespace.vala
diff options
context:
space:
mode:
authorRob Taylor <rob.taylor@codethink.co.uk>2010-01-31 16:11:00 +0000
committerJürg Billeter <j@bitron.ch>2010-02-01 16:52:38 +0100
commit7dcc676f1782a18fccfdf5203ef809e4aa6c19c9 (patch)
treed60bb9a37728f3c1dd60bd146df6fcc38d37a222 /vala/valanamespace.vala
parent6f42cc9b284f1258698c9f64222df407457a3395 (diff)
downloadvala-7dcc676f1782a18fccfdf5203ef809e4aa6c19c9.tar.gz
GIR Namespace support
This patch introduces two new CCode annotations for use in VAPI files, gir_namespace and gir_version. This allows us to correctly map vala namespaces to gobject-introspection namespaces when generating GIR files. The mapping is actually done on a SourceFile level. This allows us to work around cases where one vala namespace maps into multiple GIR namespaces (in particular, GLib vs GLib and GObject). In the absense of annotations, the old 'guess it' method will be applied. This commit also adds annotations to some core vapis. Fixes bug 584683.
Diffstat (limited to 'vala/valanamespace.vala')
-rw-r--r--vala/valanamespace.vala8
1 files changed, 7 insertions, 1 deletions
diff --git a/vala/valanamespace.vala b/vala/valanamespace.vala
index a044888c6..8ddeb9dff 100644
--- a/vala/valanamespace.vala
+++ b/vala/valanamespace.vala
@@ -562,8 +562,14 @@ public class Vala.Namespace : Symbol {
cheader_filenames.add (filename);
}
}
+ if (a.has_argument ("gir_namespace")) {
+ source_reference.file.gir_namespace = a.get_string ("gir_namespace");
+ }
+ if (a.has_argument ("gir_version")) {
+ source_reference.file.gir_version = a.get_string ("gir_version");
+ }
}
-
+
/**
* Process all associated attributes.
*/