gtk+ r20168 - in trunk: . gtk



Author: bratsche
Date: Sun May 25 23:47:36 2008
New Revision: 20168
URL: http://svn.gnome.org/viewvc/gtk+?rev=20168&view=rev

Log:
2008-05-25  Cody Russell  <bratsche gnome org>

        Bug 507389 â use gslice for gtksettings

        * gtk/gtksettings.c: Change from g_new0/g_free to use GSlice.
        Report and patch by Christian Persch.



Modified:
   trunk/ChangeLog
   trunk/gtk/gtksettings.c

Modified: trunk/gtk/gtksettings.c
==============================================================================
--- trunk/gtk/gtksettings.c	(original)
+++ trunk/gtk/gtksettings.c	Sun May 25 23:47:36 2008
@@ -1286,7 +1286,7 @@
   
   g_value_unset (&qvalue->public.value);
   g_free (qvalue->public.origin);
-  g_free (qvalue);
+  g_slice_free (GtkSettingsValuePrivate, qvalue);
 }
 
 static void
@@ -1317,7 +1317,7 @@
   qvalue = g_datalist_id_get_data (&settings->queued_settings, name_quark);
   if (!qvalue)
     {
-      qvalue = g_new0 (GtkSettingsValuePrivate, 1);
+      qvalue = g_slice_new0 (GtkSettingsValuePrivate);
       g_datalist_id_set_data_full (&settings->queued_settings, name_quark, qvalue, free_value);
     }
   else
@@ -1990,7 +1990,7 @@
       g_free (data->lastentry[i]);
     }
 
-  g_free (data);
+  g_slice_free (ColorSchemeData, data);
 }
 
 static void
@@ -2001,7 +2001,7 @@
       ColorSchemeData *data;
       GValue value = { 0, };
 
-      data = g_new0 (ColorSchemeData, 1);
+      data = g_slice_new0 (ColorSchemeData);
       data->color_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
 					        (GDestroyNotify) gdk_color_free);
       g_object_set_data_full (G_OBJECT (settings), "gtk-color-scheme",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]