summaryrefslogtreecommitdiff
path: root/gtk/gtkbuilderparser.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-09-07 12:25:29 -0400
committerMatthias Clasen <mclasen@redhat.com>2015-09-07 12:25:29 -0400
commit20079a9960778e320a0028316a565fd2cffc3c38 (patch)
treef8ae6fd50e5bd292ec169e61c953209436744013 /gtk/gtkbuilderparser.c
parent15b9feda22279e32578bd1e1c062bb401cc99a5c (diff)
downloadgtk+-20079a9960778e320a0028316a565fd2cffc3c38.tar.gz
builder: Minor refactoring
Keep the GString in PropertyInfo around, instead of throwing it away and just keeping the char*.
Diffstat (limited to 'gtk/gtkbuilderparser.c')
-rw-r--r--gtk/gtkbuilderparser.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c
index decbdb07e9..0f34d3a4c3 100644
--- a/gtk/gtkbuilderparser.c
+++ b/gtk/gtkbuilderparser.c
@@ -681,9 +681,8 @@ parse_property (ParserData *data,
static void
free_property_info (PropertyInfo *info)
{
- g_free (info->data);
+ g_string_free (info->text, TRUE);
g_free (info->context);
- /* info->text is already freed */
g_slice_free (PropertyInfo, info);
}
@@ -1157,8 +1156,6 @@ end_element (GMarkupParseContext *context,
g_string_assign (prop_info->text, translated);
}
- prop_info->data = g_string_free (prop_info->text, FALSE);
-
object_info->properties = g_slist_prepend (object_info->properties, prop_info);
}
else