summaryrefslogtreecommitdiff
path: root/tools/generate.c
diff options
context:
space:
mode:
authorJohan Dahlin <jdahlin@litl.com>2010-03-25 23:12:12 -0300
committerJohan Dahlin <johan@gnome.org>2010-03-25 23:12:12 -0300
commitd65f65cef8996e3dc1c305a6606930a061f2a99b (patch)
tree1ee6aa1b22f3663ed76c641ade614cc240a725a4 /tools/generate.c
parentd8a304b16bd285b671f144687d6fbe4a1d2bd43c (diff)
downloadgobject-introspection-d65f65cef8996e3dc1c305a6606930a061f2a99b.tar.gz
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
Diffstat (limited to 'tools/generate.c')
-rw-r--r--tools/generate.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/generate.c b/tools/generate.c
index 2292de01..b813b126 100644
--- a/tools/generate.c
+++ b/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)
{