Use gslice for GtkBorder (#383557).

2006-12-24  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtkstyle.c (gtk_border_copy), (gtk_border_free): Use gslice for
        GtkBorder (#383557).
This commit is contained in:
Behdad Esfahbod 2006-12-24 05:32:38 +00:00 committed by Behdad Esfahbod
parent d698e3eaf2
commit c0e479bfab
2 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2006-12-24 Behdad Esfahbod <behdad@gnome.org>
* gtk/gtkstyle.c (gtk_border_copy), (gtk_border_free): Use gslice for
GtkBorder (#383557).
2006-12-24 Behdad Esfahbod <behdad@gnome.org>
Bug 340141 Update to Pango 1.16 API

View File

@ -6407,7 +6407,15 @@ gtk_paint_resize_grip (GtkStyle *style,
GtkBorder *
gtk_border_copy (const GtkBorder *border)
{
return (GtkBorder *)g_memdup (border, sizeof (GtkBorder));
GtkBorder *ret;
g_return_val_if_fail (border != NULL, NULL);
ret = g_slice_new (GtkBorder);
*ret = *border;
return ret;
}
/**
@ -6419,7 +6427,7 @@ gtk_border_copy (const GtkBorder *border)
void
gtk_border_free (GtkBorder *border)
{
g_free (border);
g_slice_free (GtkBorder, border);
}
GType