Use g_slice. (#404430, Chris Wilson)
authorMatthias Clasen <mclasen@redhat.com>
Thu, 15 Mar 2007 05:01:20 +0000 (05:01 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 15 Mar 2007 05:01:20 +0000 (05:01 +0000)
2007-03-15  Matthias Clasen  <mclasen@redhat.com>

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

svn path=/trunk/; revision=5406

gobject/ChangeLog
gobject/gvaluearray.c

index c07b84d..9ee7cc4 100644 (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:
index 3db5d2e..308687b 100644 (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;