summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2010-06-12 11:22:26 -0300
committerJohan Dahlin <johan@gnome.org>2010-06-12 11:23:21 -0300
commit35d468ea1a10f46e04d7199fe9d9e6f507b20275 (patch)
treee7bec15117cbd8b3129f4e4d5a47950da555d034
parent017eb89d966b7c903a6756c57d5a4ecd07d17e23 (diff)
downloadgobject-introspection-35d468ea1a10f46e04d7199fe9d9e6f507b20275.tar.gz
[girwriter] Use GSlice
-rw-r--r--girepository/girwriter.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/girepository/girwriter.c b/girepository/girwriter.c
index 71245602..b123a134 100644
--- a/girepository/girwriter.c
+++ b/girepository/girwriter.c
@@ -1,4 +1,3 @@
-
/* -*- Mode: C; c-file-style: "gnu"; -*- */
/* GObject introspection: IDL generator
*
@@ -49,7 +48,7 @@ xml_element_new (const char *name)
{
XmlElement *elem;
- elem = g_new (XmlElement, 1);
+ elem = g_slice_new (XmlElement);
elem->name = g_strdup (name);
elem->has_children = FALSE;
return elem;
@@ -59,7 +58,7 @@ static void
xml_element_free (XmlElement *elem)
{
g_free (elem->name);
- g_free (elem);
+ g_slice_free (XmlElement, elem);
}
static void
@@ -127,7 +126,7 @@ xml_open (FILE *file)
{
Xml *xml;
- xml = g_new (Xml, 1);
+ xml = g_slice_new (Xml);
xml->file = file;
xml->stack = NULL;
@@ -151,7 +150,7 @@ static void
xml_free (Xml *xml)
{
xml_close (xml);
- g_free (xml);
+ g_slice_free (Xml, xml);
}