Bug 557379 – g-ir-generate not writing the 'abstract' attribute

2008-10-22  Tommi Komulainen  <tommi.komulainen@iki.fi>

	* tests/scanner/drawable-1.0-expected.tgir:
	* tests/scanner/drawable-injected-1.0-expected.tgir:
	* tests/scanner/foo-1.0-expected.tgir:
	* tools/generate.c (write_object_info): write 'abstract'
	attribute for classes

svn path=/trunk/; revision=785
This commit is contained in:
Tommi Komulainen 2008-10-22 16:46:19 +00:00 committed by Philip Withnall
parent 659a300f87
commit e4542c021c

View File

@ -878,11 +878,13 @@ write_object_info (const gchar *namespace,
const gchar *type_name; const gchar *type_name;
const gchar *type_init; const gchar *type_init;
gboolean deprecated; gboolean deprecated;
gboolean is_abstract;
GIObjectInfo *pnode; GIObjectInfo *pnode;
gint i; gint i;
name = g_base_info_get_name ((GIBaseInfo *)info); name = g_base_info_get_name ((GIBaseInfo *)info);
deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info); deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
is_abstract = g_object_info_get_abstract (info);
type_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info); type_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info);
type_init = g_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info); type_init = g_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info);
@ -896,6 +898,9 @@ write_object_info (const gchar *namespace,
g_base_info_unref ((GIBaseInfo *)pnode); g_base_info_unref ((GIBaseInfo *)pnode);
} }
if (is_abstract)
xml_printf (file, " abstract=\"1\"");
xml_printf (file, " glib:type-name=\"%s\" glib:get-type=\"%s\"", type_name, type_init); xml_printf (file, " glib:type-name=\"%s\" glib:get-type=\"%s\"", type_name, type_init);
if (deprecated) if (deprecated)