mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
Allocate GErrors using the slice allocator. (#354054, Matt Barnes)
2006-09-03 Matthias Clasen <mclasen@redhat.com> * glib/gerror.c: Allocate GErrors using the slice allocator. (#354054, Matt Barnes)
This commit is contained in:
parent
51453eab5d
commit
80aa03f7a2
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
@ -38,7 +38,7 @@ g_error_new_valist (GQuark domain,
|
||||
{
|
||||
GError *error;
|
||||
|
||||
error = g_new (GError, 1);
|
||||
error = g_slice_new (GError);
|
||||
|
||||
error->domain = domain;
|
||||
error->code = code;
|
||||
@ -101,7 +101,7 @@ g_error_new_literal (GQuark domain,
|
||||
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;
|
||||
@ -124,7 +124,7 @@ g_error_free (GError *error)
|
||||
|
||||
g_free (error->message);
|
||||
|
||||
g_free (error);
|
||||
g_slice_free (GError, error);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -142,7 +142,7 @@ g_error_copy (const GError *error)
|
||||
|
||||
g_return_val_if_fail (error != NULL, NULL);
|
||||
|
||||
copy = g_new (GError, 1);
|
||||
copy = g_slice_new (GError);
|
||||
|
||||
*copy = *error;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user