From 320dd66c62cb8865549dc82ebd3942adafeaf1a9 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Thu, 25 Mar 2010 23:12:12 -0300 Subject: [PATCH] Add support for foreign structs Foreign structs are special in the sense that there might be native bindings (for instance PyCairo for PyGI) that provides the same functionallity as the introspected variant. https://bugzilla.gnome.org/show_bug.cgi?id=610357 --- girepository/tools/generate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/girepository/tools/generate.c b/girepository/tools/generate.c index 2292de01f..b813b1262 100644 --- a/girepository/tools/generate.c +++ b/girepository/tools/generate.c @@ -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) {