GError **error)
{
GMarkupParser parser = { start_element, end_element, text };
- GMarkupParseContext *context;
ParseState state = { 0, };
const gchar *filename;
- context = g_markup_parse_context_new (&parser,
- G_MARKUP_PREFIX_ERROR_POSITION,
- &state, NULL);
-
state.enum_table = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, enum_state_free);
while ((filename = *files++) != NULL)
{
+ GMarkupParseContext *context;
gchar *contents;
gsize size;
+ context = g_markup_parse_context_new (&parser,
+ G_MARKUP_PREFIX_ERROR_POSITION,
+ &state, NULL);
+
if (!g_file_get_contents (filename, &contents, &size, error))
return FALSE;
g_prefix_error (error, "%s: ", filename);
return FALSE;
}
+
+ g_markup_parse_context_free (context);
}
g_hash_table_unref (state.enum_table);