Also generate new syntax

svn path=/trunk/; revision=933
This commit is contained in:
Colin Walters 2008-11-17 00:27:39 +00:00 committed by Philip Withnall
parent 1892f7dcfd
commit fcdfe8dbd9

View File

@ -987,23 +987,18 @@ write_interface_info (const gchar *namespace,
if (deprecated) if (deprecated)
xml_printf (file, " deprecated=\"1\""); xml_printf (file, " deprecated=\"1\"");
if (g_interface_info_get_n_prerequisites (info) > 0) if (g_interface_info_get_n_prerequisites (info) > 0)
{ {
xml_start_element (file, "requires");
for (i = 0; i < g_interface_info_get_n_prerequisites (info); i++) for (i = 0; i < g_interface_info_get_n_prerequisites (info); i++)
{ {
GIBaseInfo *req = g_interface_info_get_prerequisite (info, i); GIBaseInfo *req = g_interface_info_get_prerequisite (info, i);
if (g_base_info_get_type (req) == GI_INFO_TYPE_INTERFACE) xml_start_element (file, "prerequisite");
xml_start_element (file, "interface");
else
xml_start_element (file, "object");
write_type_name_attribute (namespace, req, "name", file); write_type_name_attribute (namespace, req, "name", file);
xml_end_element_unchecked (file); xml_end_element_unchecked (file);
g_base_info_unref (req); g_base_info_unref (req);
} }
xml_end_element (file, "requires");
} }
for (i = 0; i < g_interface_info_get_n_methods (info); i++) for (i = 0; i < g_interface_info_get_n_methods (info); i++)