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>
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);