unowned ArrayType? array_type = value.value_type as ArrayType;
if (array_type != null && array_type.fixed_length) {
- unowned Struct? st = array_type.element_type.type_symbol as Struct;
+ unowned Struct? st = array_type.element_type.data_type as Struct;
if (st != null && !array_type.element_type.nullable) {
var ccall = new CCodeFunctionCall (new CCodeIdentifier (append_struct_array_destroy (st)));
ccall.add_argument (get_cvalue_ (value));
return;
}
+ if (!has_namespace (cl)) {
+ return;
+ }
+
if (!(hierarchy[0] is Namespace)) {
deferred.add (cl);
return;
return;
}
+ if (!has_namespace (st)) {
+ return;
+ }
+
if (!(hierarchy[0] is Namespace)) {
deferred.add (st);
return;
return;
}
+ if (!has_namespace (iface)) {
+ return;
+ }
+
if (!(hierarchy[0] is Namespace)) {
deferred.add (iface);
return;
return;
}
+ if (!has_namespace (en)) {
+ return;
+ }
+
if (!(hierarchy[0] is Namespace)) {
deferred.add (en);
return;
return;
}
+ if (!has_namespace (edomain)) {
+ return;
+ }
+
write_indent ();
buffer.append_printf ("<enumeration name=\"%s\"", edomain.name);
write_ctype_attributes (edomain);
return;
}
+ if (!has_namespace (c)) {
+ return;
+ }
+
//TODO Add better constant evaluation
var initializer = c.value;
string value = literal_expression_to_value_string (initializer);
return;
}
+ if (!has_namespace (f)) {
+ return;
+ }
+
write_indent ();
buffer.append_printf ("<field name=\"%s\"", get_ccode_name (f));
if (f.variable_type.nullable) {
return;
}
+ if (!has_namespace (cb)) {
+ return;
+ }
+
write_indent ();
buffer.append_printf ("<callback name=\"%s\"", cb.name);
buffer.append_printf (" c:type=\"%s\"", get_ccode_name (cb));
return;
}
+ if (!has_namespace (m)) {
+ return;
+ }
+
string tag_name = "method";
var parent = this.hierarchy.get (0);
if (parent is Enum) {
private bool is_visibility (Symbol sym) {
return sym.get_attribute_bool ("GIR", "visible", true);
}
+
+ bool has_namespace (Symbol sym) {
+ if (!(sym.parent_symbol is Namespace) || sym.parent_symbol.name != null) {
+ return true;
+ }
+
+ Report.warning (sym.source_reference, "`%s' must be part of namespace to be included in GIR".printf (sym.name));
+ return false;
+ }
}