]> Pileus Git - ~andy/gtk/commitdiff
Small optimization
authorMatthias Clasen <matthiasc@src.gnome.org>
Sun, 26 Mar 2006 06:03:31 +0000 (06:03 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sun, 26 Mar 2006 06:03:31 +0000 (06:03 +0000)
ChangeLog
ChangeLog.pre-2-10
gtk/gtkcellrenderertext.c

index 697a31da55744def9a2da26c1b6072c3cbc49362..e11f54691052c38d3ddf455268e3a90ca764402c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-26  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkcellrenderertext.c (gtk_cell_render_text_get_property):
+       Avoid an unnecessary strdup.  (#336013)
+
 2006-03-24  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_value_changed): Don't call
index 697a31da55744def9a2da26c1b6072c3cbc49362..e11f54691052c38d3ddf455268e3a90ca764402c 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-26  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkcellrenderertext.c (gtk_cell_render_text_get_property):
+       Avoid an unnecessary strdup.  (#336013)
+
 2006-03-24  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_value_changed): Don't call
index 2ff8c52586bbcb6dec56702ff23c229e1e321191..a5aca6e1926d6dadb11cb0882398cff16fd7ac22 100644 (file)
@@ -689,14 +689,7 @@ gtk_cell_renderer_text_get_property (GObject        *object,
       break;
 
     case PROP_FONT:
-      {
-        /* FIXME GValue imposes a totally gratuitous string copy
-         * here, we could just hand off string ownership
-         */
-        gchar *str = pango_font_description_to_string (celltext->font);
-        g_value_set_string (value, str);
-        g_free (str);
-      }
+        g_value_take_string (value, pango_font_description_to_string (celltext->font);
       break;
       
     case PROP_FONT_DESC: