diff options
author | Rob Taylor <rob.taylor@codethink.co.uk> | 2010-01-31 16:11:00 +0000 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2010-02-01 16:52:38 +0100 |
commit | 7dcc676f1782a18fccfdf5203ef809e4aa6c19c9 (patch) | |
tree | d60bb9a37728f3c1dd60bd146df6fcc38d37a222 /vala/valanamespace.vala | |
parent | 6f42cc9b284f1258698c9f64222df407457a3395 (diff) | |
download | vala-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.vala | 8 |
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. */ |