}
string iface_name = namespace_strategy.get_name (name);
+
+ foreach (var iface in current_ns.get_interfaces ()) {
+ // The default interfaces can occur duplicated
+ if ((iface_name == namespace_strategy.get_name ("org.freedesktop.DBus.Peer")
+ || iface_name == namespace_strategy.get_name ("org.freedesktop.DBus.Introspectable")
+ || iface_name == namespace_strategy.get_name ("org.freedesktop.DBus.Properties")
+ || iface_name == namespace_strategy.get_name ("org.freedesktop.DBus.ObjectManager")) && iface.name == iface_name) {
+ next ();
+ seek_end ("interface");
+ return;
+ }
+ }
current_node = current_iface = new Interface (iface_name, get_current_src ());
current_iface.access = SymbolAccessibility.PUBLIC;
next ();
}
+ private void seek_end (string name) {
+ while (current_token != MarkupTokenType.END_ELEMENT || reader.name != name) {
+ skip_element ();
+ if (current_token == MarkupTokenType.EOF) {
+ return;
+ }
+ }
+ next ();
+ }
+
private SourceReference get_current_src () {
return new SourceReference (current_source_file, begin, end);
}
}
} else {
var element_type = get_variant_type (element);
- if (element != null && !(element_type is ArrayType)) {
+ if (element != null && !(element_type is ArrayType) && element_type != null) {
var array = new ArrayType (element_type, 1, null);
array.value_owned = true;
return array;
}
}
- } else if (type.equal (VariantType.TUPLE)) {
- // TODO: Emit structure
}
if (!skipped_generation) {