Use gslices
authorMyhailo Danylenko <isbear@ukrpost.net>
Sun, 22 Jul 2012 15:45:05 +0300
changeset 34 eea355fa94cf
parent 33 9151fef57135
child 35 a77a8e7ab8ae
Use gslices
pep.c
--- a/pep.c	Mon May 21 22:42:20 2012 +0300
+++ b/pep.c	Sun Jul 22 15:45:05 2012 +0300
@@ -104,7 +104,7 @@
 	if (handler -> destroy_notify)
 		handler -> destroy_notify (handler -> data);
 	g_free (handler -> xmlns);
-	g_free (handler);
+	g_slice_free (pep_handler_t, handler);
 	return;
 }
 
@@ -164,7 +164,7 @@
 
 void pep_register_xmlns_handler (const gchar *xmlns, pep_xmlns_handler_t handler, gpointer udata, GDestroyNotify notify)
 {
-	pep_handler_t *h = g_new (pep_handler_t, 1);
+	pep_handler_t *h = g_slice_new (pep_handler_t);
 
 	h->xmlns          = g_strdup (xmlns);
 	h->handler        = handler;