[vala] GIR writer: Fix generation of implemented interfaces
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] GIR writer: Fix generation of implemented interfaces
- Date: Mon, 14 Sep 2009 10:47:01 +0000 (UTC)
commit abdeffd85a17e691d2867d37f51b881702a155b0
Author: Jan Hudec <bulb ucw cz>
Date: Mon Aug 31 14:22:55 2009 +0200
GIR writer: Fix generation of implemented interfaces
The list of implemented interfaces is expected as
<implements name="Interface1" />
<implements name="Interface2" />
...
by gobject-introspection library (as of 0.6.3), but was written as
<implements>
<implements name="Interface1" />
<implements name="Interface2" />
...
</implements>
by Vala.GIRWriter. Note, that vapigen expects the same format as
gobject-introspection, so it was not able to read vala-written .girs
before the change and is able to read them properly now.
Fixes bug 584576.
Signed-off-by: Jan Hudec <bulb ucw cz>
codegen/valagirwriter.vala | 14 +-------------
1 files changed, 1 insertions(+), 13 deletions(-)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index 25ced90..029a949 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -166,25 +166,13 @@ public class Vala.GIRWriter : CodeVisitor {
indent++;
// write implemented interfaces
- bool first = true;
foreach (DataType base_type in cl.get_base_types ()) {
var object_type = (ObjectType) base_type;
if (object_type.type_symbol is Interface) {
- if (first) {
- write_indent ();
- stream.printf ("<implements>\n");
- indent++;
- first = false;
- }
write_indent ();
- stream.printf ("<interface name=\"%s\"/>\n", gi_type_name (object_type.type_symbol));
+ stream.printf ("<implements name=\"%s\"/>\n", gi_type_name (object_type.type_symbol));
}
}
- if (!first) {
- indent--;
- write_indent ();
- stream.printf ("</implements>\n");
- }
write_annotations (cl);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]