Commit 96b37f4e authored by Alexander Larsson's avatar Alexander Larsson Committed by Matthias Clasen

Use the new GtkBuildableParser type in GtkBuildable interfaces

parent 135cea76
......@@ -178,47 +178,47 @@ static void gtk_assistant_page_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
static void gtk_assistant_buildable_interface_init (GtkBuildableIface *iface);
static void gtk_assistant_buildable_add_child (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const char *type);
static gboolean gtk_assistant_buildable_custom_tag_start (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
GMarkupParser *parser,
gpointer *data);
static void gtk_assistant_buildable_custom_finished (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
gpointer user_data);
static GList* find_page (GtkAssistant *assistant,
GtkWidget *page);
static void on_assistant_close (GtkWidget *widget,
GtkAssistant *assistant);
static void on_assistant_apply (GtkWidget *widget,
GtkAssistant *assistant);
static void on_assistant_forward (GtkWidget *widget,
GtkAssistant *assistant);
static void on_assistant_back (GtkWidget *widget,
GtkAssistant *assistant);
static void on_assistant_cancel (GtkWidget *widget,
GtkAssistant *assistant);
static void on_assistant_last (GtkWidget *widget,
GtkAssistant *assistant);
static void assistant_remove_page_cb (GtkContainer *container,
GtkWidget *page,
GtkAssistant *assistant);
static int gtk_assistant_add_page (GtkAssistant *assistant,
GtkAssistantPage *page_info,
gint position);
GType _gtk_assistant_accessible_get_type (void);
static void gtk_assistant_buildable_interface_init (GtkBuildableIface *iface);
static void gtk_assistant_buildable_add_child (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const char *type);
static gboolean gtk_assistant_buildable_custom_tag_start (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
GtkBuildableParser *parser,
gpointer *data);
static void gtk_assistant_buildable_custom_finished (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
gpointer user_data);
static GList* find_page (GtkAssistant *assistant,
GtkWidget *page);
static void on_assistant_close (GtkWidget *widget,
GtkAssistant *assistant);
static void on_assistant_apply (GtkWidget *widget,
GtkAssistant *assistant);
static void on_assistant_forward (GtkWidget *widget,
GtkAssistant *assistant);
static void on_assistant_back (GtkWidget *widget,
GtkAssistant *assistant);
static void on_assistant_cancel (GtkWidget *widget,
GtkAssistant *assistant);
static void on_assistant_last (GtkWidget *widget,
GtkAssistant *assistant);
static void assistant_remove_page_cb (GtkContainer *container,
GtkWidget *page,
GtkAssistant *assistant);
static int gtk_assistant_add_page (GtkAssistant *assistant,
GtkAssistantPage *page_info,
gint position);
GType _gtk_assistant_accessible_get_type (void);
enum
{
......@@ -2355,7 +2355,7 @@ gtk_assistant_buildable_custom_tag_start (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
GMarkupParser *parser,
GtkBuildableParser *parser,
gpointer *data)
{
return parent_buildable_iface->custom_tag_start (buildable, builder, child,
......
......@@ -230,12 +230,12 @@ gtk_buildable_construct_child (GtkBuildable *buildable,
* if it doesn't.
**/
gboolean
gtk_buildable_custom_tag_start (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
GMarkupParser *parser,
gpointer *data)
gtk_buildable_custom_tag_start (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
GtkBuildableParser *parser,
gpointer *data)
{
GtkBuildableIface *iface;
......
......@@ -126,42 +126,42 @@ struct _GtkBuildableIface
GTypeInterface g_iface;
/* virtual table */
void (* set_name) (GtkBuildable *buildable,
const gchar *name);
const gchar * (* get_name) (GtkBuildable *buildable);
void (* add_child) (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *type);
void (* set_buildable_property) (GtkBuildable *buildable,
GtkBuilder *builder,
const gchar *name,
const GValue *value);
GObject * (* construct_child) (GtkBuildable *buildable,
GtkBuilder *builder,
const gchar *name);
gboolean (* custom_tag_start) (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
GMarkupParser *parser,
gpointer *data);
void (* custom_tag_end) (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
gpointer data);
void (* custom_finished) (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
gpointer data);
void (* parser_finished) (GtkBuildable *buildable,
GtkBuilder *builder);
GObject * (* get_internal_child) (GtkBuildable *buildable,
GtkBuilder *builder,
const gchar *childname);
void (* set_name) (GtkBuildable *buildable,
const gchar *name);
const gchar * (* get_name) (GtkBuildable *buildable);
void (* add_child) (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *type);
void (* set_buildable_property) (GtkBuildable *buildable,
GtkBuilder *builder,
const gchar *name,
const GValue *value);
GObject * (* construct_child) (GtkBuildable *buildable,
GtkBuilder *builder,
const gchar *name);
gboolean (* custom_tag_start) (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
GtkBuildableParser *parser,
gpointer *data);
void (* custom_tag_end) (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
gpointer data);
void (* custom_finished) (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
gpointer data);
void (* parser_finished) (GtkBuildable *buildable,
GtkBuilder *builder);
GObject * (* get_internal_child) (GtkBuildable *buildable,
GtkBuilder *builder,
const gchar *childname);
};
......@@ -192,7 +192,7 @@ gboolean gtk_buildable_custom_tag_start (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
GMarkupParser *parser,
GtkBuildableParser *parser,
gpointer *data);
GDK_AVAILABLE_IN_ALL
void gtk_buildable_custom_tag_end (GtkBuildable *buildable,
......
......@@ -80,12 +80,12 @@ gtk_builder_menu_pop_frame (GtkBuilderMenuState *state)
}
static void
gtk_builder_menu_start_element (GMarkupParseContext *context,
const gchar *element_name,
const gchar **attribute_names,
const gchar **attribute_values,
gpointer user_data,
GError **error)
gtk_builder_menu_start_element (GtkBuildableParseContext *context,
const gchar *element_name,
const gchar **attribute_names,
const gchar **attribute_values,
gpointer user_data,
GError **error)
{
GtkBuilderMenuState *state = user_data;
......@@ -214,14 +214,15 @@ gtk_builder_menu_start_element (GMarkupParseContext *context,
}
{
const GSList *element_stack;
GPtrArray *element_stack;
element_stack = g_markup_parse_context_get_element_stack (context);
element_stack = gtk_buildable_parse_context_get_element_stack (context);
if (element_stack->next)
if (element_stack->len > 1)
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
_("Element <%s> not allowed inside <%s>"),
element_name, (const gchar *) element_stack->next->data);
element_name,
(const gchar *) g_ptr_array_index (element_stack, element_stack->len - 2));
else
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
......@@ -230,10 +231,10 @@ gtk_builder_menu_start_element (GMarkupParseContext *context,
}
static void
gtk_builder_menu_end_element (GMarkupParseContext *context,
const gchar *element_name,
gpointer user_data,
GError **error)
gtk_builder_menu_end_element (GtkBuildableParseContext *context,
const gchar *element_name,
gpointer user_data,
GError **error)
{
GtkBuilderMenuState *state = user_data;
......@@ -297,11 +298,11 @@ gtk_builder_menu_end_element (GMarkupParseContext *context,
}
static void
gtk_builder_menu_text (GMarkupParseContext *context,
const gchar *text,
gsize text_len,
gpointer user_data,
GError **error)
gtk_builder_menu_text (GtkBuildableParseContext *context,
const gchar *text,
gsize text_len,
gpointer user_data,
GError **error)
{
GtkBuilderMenuState *state = user_data;
gint i;
......@@ -315,15 +316,15 @@ gtk_builder_menu_text (GMarkupParseContext *context,
else
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
_("Text may not appear inside <%s>"),
g_markup_parse_context_get_element (context));
gtk_buildable_parse_context_get_element (context));
break;
}
}
static void
gtk_builder_menu_error (GMarkupParseContext *context,
GError *error,
gpointer user_data)
gtk_builder_menu_error (GtkBuildableParseContext *context,
GError *error,
gpointer user_data)
{
GtkBuilderMenuState *state = user_data;
......@@ -348,12 +349,11 @@ gtk_builder_menu_error (GMarkupParseContext *context,
g_slice_free (GtkBuilderMenuState, state);
}
static GMarkupParser gtk_builder_menu_subparser =
static GtkBuildableParser gtk_builder_menu_subparser =
{
gtk_builder_menu_start_element,
gtk_builder_menu_end_element,
gtk_builder_menu_text,
NULL, /* passthrough */
gtk_builder_menu_error
};
......@@ -369,7 +369,7 @@ _gtk_builder_menu_start (ParserData *parser_data,
state = g_slice_new0 (GtkBuilderMenuState);
state->parser_data = parser_data;
g_markup_parse_context_push (parser_data->ctx, &gtk_builder_menu_subparser, state);
gtk_buildable_parse_context_push (&parser_data->ctx, &gtk_builder_menu_subparser, state);
if (COLLECT (STRING, "id", &id))
{
......@@ -387,7 +387,7 @@ _gtk_builder_menu_end (ParserData *parser_data)
{
GtkBuilderMenuState *state;
state = g_markup_parse_context_pop (parser_data->ctx);
state = gtk_buildable_parse_context_pop (&parser_data->ctx);
gtk_builder_menu_pop_frame (state);
g_assert (state->frame.prev == NULL);
......
......@@ -2805,7 +2805,7 @@ gtk_builder_get_application (GtkBuilder *builder)
/*< private >
* _gtk_builder_prefix_error:
* @builder: a #GtkBuilder
* @context: the #GMarkupParseContext
* @context: the #GtkBuildableParseContext
* @error: an error
*
* Calls g_prefix_error() to prepend a filename:line:column marker
......@@ -2817,21 +2817,21 @@ gtk_builder_get_application (GtkBuilder *builder)
* g_markup_collect_attributes() in a start_element vfunc.
*/
void
_gtk_builder_prefix_error (GtkBuilder *builder,
GMarkupParseContext *context,
GError **error)
_gtk_builder_prefix_error (GtkBuilder *builder,
GtkBuildableParseContext *context,
GError **error)
{
GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder);
gint line, col;
g_markup_parse_context_get_position (context, &line, &col);
gtk_buildable_parse_context_get_position (context, &line, &col);
g_prefix_error (error, "%s:%d:%d ", priv->filename, line, col);
}
/*< private >
* _gtk_builder_error_unhandled_tag:
* @builder: a #GtkBuilder
* @context: the #GMarkupParseContext
* @context: the #GtkBuildableParseContext
* @object: name of the object that is being handled
* @element_name: name of the element whose start tag is being handled
* @error: return location for the error
......@@ -2842,16 +2842,16 @@ _gtk_builder_prefix_error (GtkBuilder *builder,
* This is intended to be called in a start_element vfunc.
*/
void
_gtk_builder_error_unhandled_tag (GtkBuilder *builder,
GMarkupParseContext *context,
const gchar *object,
const gchar *element_name,
GError **error)
_gtk_builder_error_unhandled_tag (GtkBuilder *builder,
GtkBuildableParseContext *context,
const gchar *object,
const gchar *element_name,
GError **error)
{
GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder);
gint line, col;
g_markup_parse_context_get_position (context, &line, &col);
gtk_buildable_parse_context_get_position (context, &line, &col);
g_set_error (error,
GTK_BUILDER_ERROR,
GTK_BUILDER_ERROR_UNHANDLED_TAG,
......@@ -2862,7 +2862,7 @@ _gtk_builder_error_unhandled_tag (GtkBuilder *builder,
/*< private >
* @builder: a #GtkBuilder
* @context: the #GMarkupParseContext
* @context: the #GtkBuildableParseContext
* @parent_name: the name of the expected parent element
* @error: return location for an error
*
......@@ -2875,27 +2875,27 @@ _gtk_builder_error_unhandled_tag (GtkBuilder *builder,
* Returns: %TRUE if @parent_name is the parent element
*/
gboolean
_gtk_builder_check_parent (GtkBuilder *builder,
GMarkupParseContext *context,
const gchar *parent_name,
GError **error)
_gtk_builder_check_parent (GtkBuilder *builder,
GtkBuildableParseContext *context,
const gchar *parent_name,
GError **error)
{
GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder);
const GSList *stack;
GPtrArray *stack;
gint line, col;
const gchar *parent;
const gchar *element;
stack = g_markup_parse_context_get_element_stack (context);
stack = gtk_buildable_parse_context_get_element_stack (context);
element = (const gchar *)stack->data;
parent = stack->next ? (const gchar *)stack->next->data : "";
element = g_ptr_array_index (stack, stack->len - 1);
parent = stack->len > 1 ? g_ptr_array_index (stack, stack->len - 2) : "";
if (g_str_equal (parent_name, parent) ||
(g_str_equal (parent_name, "object") && g_str_equal (parent, "template")))
return TRUE;
g_markup_parse_context_get_position (context, &line, &col);
gtk_buildable_parse_context_get_position (context, &line, &col);
g_set_error (error,
GTK_BUILDER_ERROR,
GTK_BUILDER_ERROR_INVALID_TAG,
......
......@@ -392,7 +392,7 @@ error_missing_attribute (ParserData *data,
{
gint line, col;
g_markup_parse_context_get_position (data->ctx, &line, &col);
gtk_buildable_parse_context_get_position (&data->ctx, &line, &col);
g_set_error (error,
GTK_BUILDER_ERROR,
......@@ -409,7 +409,7 @@ error_invalid_tag (ParserData *data,
{
gint line, col;
g_markup_parse_context_get_position (data->ctx, &line, &col);
gtk_buildable_parse_context_get_position (&data->ctx, &line, &col);
if (expected)
g_set_error (error,
......@@ -432,7 +432,7 @@ error_unhandled_tag (ParserData *data,
{
gint line, col;
g_markup_parse_context_get_position (data->ctx, &line, &col);
gtk_buildable_parse_context_get_position (&data->ctx, &line, &col);
g_set_error (error,
GTK_BUILDER_ERROR,
GTK_BUILDER_ERROR_UNHANDLED_TAG,
......@@ -512,7 +512,7 @@ parse_requires (ParserData *data,
G_MARKUP_COLLECT_STRING, "version", &version,
G_MARKUP_COLLECT_INVALID))
{
_gtk_builder_prefix_error (data->builder, data->ctx, error);
_gtk_builder_prefix_error (data->builder, &data->ctx, error);
return;
}
......@@ -522,7 +522,7 @@ parse_requires (ParserData *data,
GTK_BUILDER_ERROR,
GTK_BUILDER_ERROR_INVALID_VALUE,
"'version' attribute has malformed value '%s'", version);
_gtk_builder_prefix_error (data->builder, data->ctx, error);
_gtk_builder_prefix_error (data->builder, &data->ctx, error);
return;
}
version_major = g_ascii_strtoll (split[0], NULL, 10);
......@@ -553,12 +553,12 @@ is_requested_object (const gchar *object,
}
static void
parse_object (GMarkupParseContext *context,
ParserData *data,
const gchar *element_name,
const gchar **names,
const gchar **values,
GError **error)
parse_object (GtkBuildableParseContext *context,
ParserData *data,
const gchar *element_name,
const gchar **names,
const gchar **values,
GError **error)
{
ObjectInfo *object_info;
ChildInfo* child_info;
......@@ -590,7 +590,7 @@ parse_object (GMarkupParseContext *context,
G_MARKUP_COLLECT_STRING|G_MARKUP_COLLECT_OPTIONAL, "id", &object_id,
G_MARKUP_COLLECT_INVALID))
{
_gtk_builder_prefix_error (data->builder, data->ctx, error);
_gtk_builder_prefix_error (data->builder, &data->ctx, error);
return;
}
......@@ -681,17 +681,17 @@ parse_object (GMarkupParseContext *context,
return;
}
g_markup_parse_context_get_position (context, &line, NULL);
gtk_buildable_parse_context_get_position (context, &line, NULL);
g_hash_table_insert (data->object_ids, g_strdup (object_id), GINT_TO_POINTER (line));
}
static void
parse_template (GMarkupParseContext *context,
ParserData *data,
const gchar *element_name,
const gchar **names,
const gchar **values,
GError **error)
parse_template (GtkBuildableParseContext *context,
ParserData *data,
const gchar *element_name,
const gchar **names,
const gchar **values,
GError **error)
{
ObjectInfo *object_info;
const gchar *object_class = NULL;
......@@ -707,7 +707,7 @@ parse_template (GMarkupParseContext *context,
G_MARKUP_COLLECT_STRING|G_MARKUP_COLLECT_OPTIONAL, "parent", &parent_class,
G_MARKUP_COLLECT_INVALID))
{
_gtk_builder_prefix_error (data->builder, data->ctx, error);
_gtk_builder_prefix_error (data->builder, &data->ctx, error);
return;
}
......@@ -785,7 +785,7 @@ parse_template (GMarkupParseContext *context,
return;
}
g_markup_parse_context_get_position (context, &line, NULL);
gtk_buildable_parse_context_get_position (context, &line, NULL);
g_hash_table_insert (data->object_ids, g_strdup (object_class), GINT_TO_POINTER (line));
}
......@@ -829,7 +829,7 @@ parse_child (ParserData *data,
G_MARKUP_COLLECT_STRING|G_MARKUP_COLLECT_OPTIONAL, "internal-child", &internal_child,
G_MARKUP_COLLECT_INVALID))
{
_gtk_builder_prefix_error (data->builder, data->ctx, error);
_gtk_builder_prefix_error (data->builder, &data->ctx, error);
return;
}
......@@ -889,7 +889,7 @@ parse_property (ParserData *data,
G_MARKUP_COLLECT_STRING|G_MARKUP_COLLECT_OPTIONAL, "bind-flags", &bind_flags_str,
G_MARKUP_COLLECT_INVALID))
{
_gtk_builder_prefix_error (data->builder, data->ctx, error);
_gtk_builder_prefix_error (data->builder, &data->ctx, error);
return;
}
......@@ -902,7 +902,7 @@ parse_property (ParserData *data,
GTK_BUILDER_ERROR_INVALID_PROPERTY,
"Invalid property: %s.%s",
g_type_name (object_info->type), name);
_gtk_builder_prefix_error (data->builder, data->ctx, error);
_gtk_builder_prefix_error (data->builder, &data->ctx, error);
return;
}
......@@ -910,12 +910,12 @@ parse_property (ParserData *data,
{
if (!_gtk_builder_flags_from_string (G_TYPE_BINDING_FLAGS, NULL, bind_flags_str, &bind_flags, error))
{
_gtk_builder_prefix_error (data->builder, data->ctx, error);
_gtk_builder_prefix_error (data->builder, &data->ctx, error);
return;
}
}
g_markup_parse_context_get_position (data->ctx, &line, &col);
gtk_buildable_parse_context_get_position (&data->ctx, &line, &col);
if (bind_source)
{
......@@ -996,7 +996,7 @@ parse_signal (ParserData *data,
G_MARKUP_COLLECT_TRISTATE|G_MARKUP_COLLECT_OPTIONAL, "swapped", &swapped,
G_MARKUP_COLLECT_INVALID))
{
_gtk_builder_prefix_error (data->builder, data->ctx, error);
_gtk_builder_prefix_error (data->builder, &data->ctx, error);
return;
}
......@@ -1007,7 +1007,7 @@ parse_signal (ParserData *data,
GTK_BUILDER_ERROR_INVALID_SIGNAL,
"Invalid signal '%s' for type '%s'",
name, g_type_name (object_info->type));
_gtk_builder_prefix_error (data->builder, data->ctx, error);
_gtk_builder_prefix_error (data->builder, &data->ctx, error);
return;
}
......@@ -1066,7 +1066,7 @@ parse_interface (ParserData *data,
G_MARKUP_COLLECT_STRING|G_MARKUP_COLLECT_OPTIONAL, "domain", &domain,
G_MARKUP_COLLECT_INVALID))
{
_gtk_builder_prefix_error (data->builder, data->ctx, error);
_gtk_builder_prefix_error (data->builder, &data->ctx, error);
return;
}
......@@ -1088,7 +1088,7 @@ static SubParser *
create_subparser (GObject *object,
GObject *child,
const gchar *element_name,
GMarkupParser *parser,
GtkBuildableParser *parser,
gpointer user_data)
{
SubParser *subparser;
......@@ -1098,7 +1098,7 @@ create_subparser (GObject *object,
subparser->child = child;
subparser->tagname = g_strdup (element_name);
subparser->start = element_name;
subparser->parser = g_memdup (parser, sizeof (GMarkupParser));
subparser->parser = g_memdup (parser, sizeof (GtkBuildableParser));
subparser->data = user_data;
return subparser;
......@@ -1112,12 +1112,12 @@ free_subparser (SubParser *subparser)
}
static gboolean
subparser_start (GMarkupParseContext *context,
const gchar *element_name,
const gchar **names,
const gchar **values,
ParserData *data,
GError **error)
subparser_start (GtkBuildableParseContext *context,
const gchar *element_name,
const gchar **names,
const gchar **values,
ParserData *data,
GError **error)
{
SubParser *subparser = data->subparser;
......@@ -1137,10 +1137,10 @@ subparser_start (GMarkupParseContext *context,
}
static void
subparser_end (GMarkupParseContext *context,
const gchar *element_name,
ParserData *data,
GError **error)
subparser_end (GtkBuildableParseContext *context,
const gchar *element_name,
ParserData *data,
GError **error)
{
if (data->subparser->parser->end_element)
data->subparser->parser->end_element (context, element_name,
......@@ -1172,15 +1172,15 @@ subparser_end (GMarkupParseContext *context,
}
static gboolean
parse_custom (GMarkupParseContext *context,
const gchar *element_name,
const gchar **names,
const gchar **values,
ParserData *data,
GError **error)
parse_custom (GtkBuildableParseContext *context,
const gchar *element_name,
const gchar **names,
const gchar **values,
ParserData *data,
GError **error)
{
CommonInfo* parent_info;
GMarkupParser parser;
GtkBuildableParser parser;
gpointer subparser_data;
GObject *object;
GObject *child;
......@@ -1237,12 +1237,12 @@ parse_custom (GMarkupParseContext *context,
}
static void
start_element (GMarkupParseContext *context,
const gchar *element_name,
const gchar **names,
const gchar **values,
gpointer user_data,
GError **error)
start_element (GtkBuildableParseContext *context,
const gchar *element_name,
const gchar **names,
const gchar **values,
gpointer user_data,
GError **error)
{
ParserData *data = (ParserData*)user_data;
......@@ -1323,10 +1323,10 @@ _gtk_builder_parser_translate (const gchar *domain,
}
static void
end_element (GMarkupParseContext *context,
const gchar *element_name,
gpointer user_data,
GError **error)
end_element (GtkBuildableParseContext *context,
const gchar *element_name,
gpointer user_data,
GError **error)
{
ParserData *data = (ParserData*)user_data;
......@@ -1477,11 +1477,11 @@ end_element (GMarkupParseContext *context,
/* Called for character data */
/* text is not nul-terminated */