gegl r1867 - in trunk: . gegl/buffer
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r1867 - in trunk: . gegl/buffer
- Date: Fri, 18 Jan 2008 23:17:05 +0000 (GMT)
Author: neo
Date: Fri Jan 18 23:17:04 2008
New Revision: 1867
URL: http://svn.gnome.org/viewvc/gegl?rev=1867&view=rev
Log:
2008-01-19 Sven Neumann <sven gimp org>
* gegl/buffer/gegl-buffer-load.c
* gegl/buffer/gegl-buffer-save.c: use GSlice for GeglTileEntry.
Modified:
trunk/ChangeLog
trunk/gegl/buffer/gegl-buffer-load.c
trunk/gegl/buffer/gegl-buffer-save.c
Modified: trunk/gegl/buffer/gegl-buffer-load.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-load.c (original)
+++ trunk/gegl/buffer/gegl-buffer-load.c Fri Jan 18 23:17:04 2008
@@ -59,7 +59,8 @@
} LoadInfo;
-static void load_info_destroy (LoadInfo *info)
+static void
+load_info_destroy (LoadInfo *info)
{
if (!info)
return;
@@ -73,8 +74,7 @@
GList *iter;
for (iter = info->tiles; iter; iter = iter->next)
{
- GeglTileEntry *entry = iter->data;
- g_free (entry);
+ g_slice_free (GeglTileEntry, iter->data);
}
g_list_free (info->tiles);
info->tiles = NULL;
@@ -120,7 +120,7 @@
gint i;
for (i = 0; i < info->header.tile_count; i++)
{
- GeglTileEntry *entry = g_malloc0 (sizeof (GeglTileEntry));
+ GeglTileEntry *entry = g_slice_new0 (GeglTileEntry);
read (info->fd, entry, sizeof (GeglTileEntry));
Modified: trunk/gegl/buffer/gegl-buffer-save.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-save.c (original)
+++ trunk/gegl/buffer/gegl-buffer-save.c Fri Jan 18 23:17:04 2008
@@ -64,11 +64,12 @@
} SaveInfo;
-GeglTileEntry *tile_entry_new (gint x,
- gint y,
- gint z)
+static GeglTileEntry *
+tile_entry_new (gint x,
+ gint y,
+ gint z)
{
- GeglTileEntry *entry = g_malloc0 (sizeof (GeglTileEntry));
+ GeglTileEntry *entry = g_slice_new0 (GeglTileEntry);
entry->x = x;
entry->y = y;
@@ -76,12 +77,14 @@
return entry;
}
-void tile_entry_destroy (GeglTileEntry *entry)
+static void
+tile_entry_destroy (GeglTileEntry *entry)
{
- g_free (entry);
+ g_slice_free (GeglTileEntry, entry);
}
-void save_info_destroy (SaveInfo *info)
+static void
+save_info_destroy (SaveInfo *info)
{
if (!info)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]