diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2006-12-24 05:32:38 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2006-12-24 05:32:38 +0000 |
commit | c0e479bfab91e9972219acdb6bb232c846a36242 (patch) | |
tree | f6cf0be2a26788334de58974b0da1671e558b137 /gtk/gtkstyle.c | |
parent | d698e3eaf25357bd6edd7c685dee06787853400e (diff) | |
download | gtk+-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.c | 12 |
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 |