2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
+ * tools/generate.c (write_field_info, write_callable_info,
+ write_function_info, write_callback_info, write_struct_info,
+ write_constant_value, write_signal_info, write_vfunc_info,
+ write_object_info, write_interface_info, write_union_info,
+ write_repository): remove unused indent parameters, xmlwriter
+ keeps track of necessary indentation
+
+2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
+
* tools/generate.c (xml_element_new, xml_element_free,
xml_start_element, xml_end_element, xml_end_element_unchecked,
xml_open, xml_close): Keep track of generated XML tree and
static void
write_callable_info (const gchar *namespace,
GICallableInfo *info,
- Xml *file,
- gint indent)
+ Xml *file)
{
GITypeInfo *type;
gint i;
static void
write_function_info (const gchar *namespace,
GIFunctionInfo *info,
- Xml *file,
- gint indent)
+ Xml *file)
{
GIFunctionInfoFlags flags;
const gchar *tag;
if (deprecated)
xml_printf (file, " deprecated=\"1\"");
- write_callable_info (namespace, (GICallableInfo*)info, file, indent);
+ write_callable_info (namespace, (GICallableInfo*)info, file);
xml_end_element (file, tag);
}
static void
write_callback_info (const gchar *namespace,
GICallbackInfo *info,
- Xml *file,
- gint indent)
+ Xml *file)
{
const gchar *name;
gboolean deprecated;
if (deprecated)
xml_printf (file, " deprecated=\"1\"");
- write_callable_info (namespace, (GICallableInfo*)info, file, indent);
+ write_callable_info (namespace, (GICallableInfo*)info, file);
xml_end_element (file, "callback");
}
for (i = 0; i < g_struct_info_get_n_methods (info); i++)
{
GIFunctionInfo *function = g_struct_info_get_method (info, i);
- write_function_info (namespace, function, file, 6);
+ write_function_info (namespace, function, file);
g_base_info_unref ((GIBaseInfo *)function);
}
static void
write_constant_info (const gchar *namespace,
GIConstantInfo *info,
- Xml *file,
- gint indent)
+ Xml *file)
{
GITypeInfo *type;
const gchar *name;
if (flags & G_SIGNAL_NO_HOOKS)
xml_printf (file, " no-hooks=\"1\"");
- write_callable_info (namespace, (GICallableInfo*)info, file, 6);
+ write_callable_info (namespace, (GICallableInfo*)info, file);
xml_end_element (file, "glib:signal");
}
xml_printf (file, " offset=\"%d\"", offset);
- write_callable_info (namespace, (GICallableInfo*)info, file, 6);
+ write_callable_info (namespace, (GICallableInfo*)info, file);
xml_end_element (file, "vfunc");
}
for (i = 0; i < g_object_info_get_n_methods (info); i++)
{
GIFunctionInfo *function = g_object_info_get_method (info, i);
- write_function_info (namespace, function, file, 6);
+ write_function_info (namespace, function, file);
g_base_info_unref ((GIBaseInfo *)function);
}
for (i = 0; i < g_object_info_get_n_constants (info); i++)
{
GIConstantInfo *constant = g_object_info_get_constant (info, i);
- write_constant_info (namespace, constant, file, 6);
+ write_constant_info (namespace, constant, file);
g_base_info_unref ((GIBaseInfo *)constant);
}
for (i = 0; i < g_interface_info_get_n_methods (info); i++)
{
GIFunctionInfo *function = g_interface_info_get_method (info, i);
- write_function_info (namespace, function, file, 6);
+ write_function_info (namespace, function, file);
g_base_info_unref ((GIBaseInfo *)function);
}
for (i = 0; i < g_interface_info_get_n_constants (info); i++)
{
GIConstantInfo *constant = g_interface_info_get_constant (info, i);
- write_constant_info (namespace, constant, file, 6);
+ write_constant_info (namespace, constant, file);
g_base_info_unref ((GIBaseInfo *)constant);
}
for (i = 0; i < g_union_info_get_n_methods (info); i++)
{
GIFunctionInfo *function = g_union_info_get_method (info, i);
- write_function_info (namespace, function, file, 6);
+ write_function_info (namespace, function, file);
g_base_info_unref ((GIBaseInfo *)function);
}
switch (g_base_info_get_type (info))
{
case GI_INFO_TYPE_FUNCTION:
- write_function_info (ns, (GIFunctionInfo *)info, xml, 4);
+ write_function_info (ns, (GIFunctionInfo *)info, xml);
break;
case GI_INFO_TYPE_CALLBACK:
- write_callback_info (ns, (GICallbackInfo *)info, xml, 4);
+ write_callback_info (ns, (GICallbackInfo *)info, xml);
break;
case GI_INFO_TYPE_STRUCT:
break;
case GI_INFO_TYPE_CONSTANT:
- write_constant_info (ns, (GIConstantInfo *)info, xml, 4);
+ write_constant_info (ns, (GIConstantInfo *)info, xml);
break;
case GI_INFO_TYPE_OBJECT: