[lasem] viewbox: use g_slice
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [lasem] viewbox: use g_slice
- Date: Tue, 12 Jul 2016 15:33:12 +0000 (UTC)
commit 467ff4ddd3efd13c8d98d2b0e23b05fd4599e686
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Mon Jul 11 11:38:23 2016 +0200
viewbox: use g_slice
src/lsmsvglength.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/lsmsvglength.c b/src/lsmsvglength.c
index 83b88db..30b748f 100644
--- a/src/lsmsvglength.c
+++ b/src/lsmsvglength.c
@@ -32,7 +32,7 @@ lsm_svg_viewbox_new (double resolution_ppi,
{
LsmSvgViewbox *svg_viewbox;
- svg_viewbox = g_new (LsmSvgViewbox, 1);
+ svg_viewbox = g_slice_new (LsmSvgViewbox);
svg_viewbox->resolution_ppi = resolution_ppi;
svg_viewbox->viewbox = *viewbox;
svg_viewbox->diagonal = sqrt (viewbox->width * viewbox->width +
@@ -44,7 +44,7 @@ lsm_svg_viewbox_new (double resolution_ppi,
void
lsm_svg_viewbox_free (LsmSvgViewbox *viewbox)
{
- g_free (viewbox);
+ g_slice_free (LsmSvgViewbox, viewbox);
}
double
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]