Add support for foreign structs
[gnome.gobject-introspection] / tools / generate.c
index 2292de0..b813b12 100644 (file)
@@ -606,6 +606,7 @@ write_struct_info (const gchar  *namespace,
   const gchar *type_init;
   gboolean deprecated;
   gboolean is_gtype_struct;
+  gboolean foreign;
   gint i;
   gint size;
   int n_elts;
@@ -643,6 +644,10 @@ write_struct_info (const gchar  *namespace,
   if (show_all && size >= 0)
     xml_printf (file, " size=\"%d\"", size);
 
+  foreign = g_struct_info_is_foreign (info);
+  if (foreign)
+    xml_printf (file, " foreign=\"1\"");
+
   n_elts = g_struct_info_get_n_fields (info) + g_struct_info_get_n_methods (info);
   if (n_elts > 0)
     {