summaryrefslogtreecommitdiff
path: root/gtk/gtkstyle.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-12-24 05:32:38 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-12-24 05:32:38 +0000
commitc0e479bfab91e9972219acdb6bb232c846a36242 (patch)
treef6cf0be2a26788334de58974b0da1671e558b137 /gtk/gtkstyle.c
parentd698e3eaf25357bd6edd7c685dee06787853400e (diff)
downloadgtk+-c0e479bfab91e9972219acdb6bb232c846a36242.tar.gz
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).
Diffstat (limited to 'gtk/gtkstyle.c')
-rw-r--r--gtk/gtkstyle.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index e10f743bd3..b7d1d8f0a8 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -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