Use g_slice. (#404430, Chris Wilson)

2007-03-15  Matthias Clasen  <mclasen@redhat.com>

        * gvaluearray.c: Use  g_slice.  (#404430, Chris Wilson)


svn path=/trunk/; revision=5406
This commit is contained in:
Matthias Clasen 2007-03-15 05:01:20 +00:00 committed by Matthias Clasen
parent 57c2e6f751
commit 617862f3f0
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2007-03-15 Matthias Clasen <mclasen@redhat.com>
* gvaluearray.c: Use g_slice. (#404430, Chris Wilson)
2007-03-14 Stefan Kost <ensonic@users.sf.net>
* gparam.h:

View File

@ -82,7 +82,7 @@ value_array_shrink (GValueArray *value_array)
GValueArray*
g_value_array_new (guint n_prealloced)
{
GValueArray *value_array = g_new (GValueArray, 1);
GValueArray *value_array = g_slice_new (GValueArray);
value_array->n_values = 0;
value_array->n_prealloced = 0;
@ -108,7 +108,7 @@ g_value_array_free (GValueArray *value_array)
g_value_unset (value);
}
g_free (value_array->values);
g_free (value_array);
g_slice_free (GValueArray, value_array);
}
GValueArray*
@ -119,7 +119,7 @@ g_value_array_copy (const GValueArray *value_array)
g_return_val_if_fail (value_array != NULL, NULL);
new_array = g_new (GValueArray, 1);
new_array = g_slice_new (GValueArray);
new_array->n_values = 0;
new_array->values = NULL;
new_array->n_prealloced = 0;