mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
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
This commit is contained in:
parent
567a6d2195
commit
320dd66c62
@ -606,6 +606,7 @@ write_struct_info (const gchar *namespace,
|
|||||||
const gchar *type_init;
|
const gchar *type_init;
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
gboolean is_gtype_struct;
|
gboolean is_gtype_struct;
|
||||||
|
gboolean foreign;
|
||||||
gint i;
|
gint i;
|
||||||
gint size;
|
gint size;
|
||||||
int n_elts;
|
int n_elts;
|
||||||
@ -643,6 +644,10 @@ write_struct_info (const gchar *namespace,
|
|||||||
if (show_all && size >= 0)
|
if (show_all && size >= 0)
|
||||||
xml_printf (file, " size=\"%d\"", size);
|
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);
|
n_elts = g_struct_info_get_n_fields (info) + g_struct_info_get_n_methods (info);
|
||||||
if (n_elts > 0)
|
if (n_elts > 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user