[vala] GIR writer: add c:prefix support for namespaces
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Subject: [vala] GIR writer: add c:prefix support for namespaces
- Date: Tue, 28 Jul 2009 13:40:42 +0000 (UTC)
commit 932e18855c50c14e60fc75a21b3dce5108c2ad8c
Author: Mark Lee <marklee src gnome org>
Date: Tue May 26 01:06:37 2009 -0700
GIR writer: add c:prefix support for namespaces
Emit a c:prefix attribute for namespaces, if the cprefix exists,
fixes bug 583862.
codegen/valagirwriter.vala | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index fd46053..98b2af2 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -125,7 +125,12 @@ public class Vala.GIRWriter : CodeVisitor {
write_c_includes (ns);
write_indent ();
- stream.printf ("<namespace name=\"%s\" version=\"%s\">\n", gir_namespace, gir_version);
+ stream.printf ("<namespace name=\"%s\" version=\"%s\"", gir_namespace, gir_version);
+ string? cprefix = ns.get_cprefix ();
+ if (cprefix != null) {
+ stream.printf (" c:prefix=\"%s\"", cprefix);
+ }
+ stream.printf (">\n");
indent++;
write_annotations (ns);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]