+2006-09-03 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gerror.c: Allocate GErrors using the slice allocator.
+ (#354054, Matt Barnes)
+
2006-09-02 Matthias Clasen <mclasen@redhat.com>
* glib/gtimer.c: Forgotten HAVE_CLOCK_GETTIME.
{
GError *error;
- error = g_new (GError, 1);
+ error = g_slice_new (GError);
error->domain = domain;
error->code = code;
g_return_val_if_fail (message != NULL, NULL);
g_return_val_if_fail (domain != 0, NULL);
- err = g_new (GError, 1);
+ err = g_slice_new (GError);
err->domain = domain;
err->code = code;
g_free (error->message);
- g_free (error);
+ g_slice_free (GError, error);
}
/**
g_return_val_if_fail (error != NULL, NULL);
- copy = g_new (GError, 1);
+ copy = g_slice_new (GError);
*copy = *error;