From e61fd8874a8352fb5fa1c4b2ab84d29679fa7b0c Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 12 Feb 2010 14:13:32 -0500 Subject: use g_slice_new() instead of g_new() part 4 --- obrender/mask.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'obrender/mask.c') diff --git a/obrender/mask.c b/obrender/mask.c index b6e3c443..506d5b28 100644 --- a/obrender/mask.c +++ b/obrender/mask.c @@ -24,7 +24,7 @@ RrPixmapMask *RrPixmapMaskNew(const RrInstance *inst, gint w, gint h, const gchar *data) { - RrPixmapMask *m = g_new(RrPixmapMask, 1); + RrPixmapMask *m = g_slice_new(RrPixmapMask); m->inst = inst; m->width = w; m->height = h; @@ -40,7 +40,7 @@ void RrPixmapMaskFree(RrPixmapMask *m) if (m) { XFreePixmap(RrDisplay(m->inst), m->mask); g_free(m->data); - g_free(m); + g_slice_free(RrPixmapMask, m); } } @@ -70,7 +70,7 @@ void RrPixmapMaskDraw(Pixmap p, const RrTextureMask *m, const RrRect *area) RrPixmapMask *RrPixmapMaskCopy(const RrPixmapMask *src) { - RrPixmapMask *m = g_new(RrPixmapMask, 1); + RrPixmapMask *m = g_slice_new(RrPixmapMask); m->inst = src->inst; m->width = src->width; m->height = src->height; -- cgit v1.2.3