Commit fd30d5c9 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/config/gimpbaseconfig.h use gint64 for all memsize properties.

2003-11-16  Sven Neumann  <sven@gimp.org>

	* app/config/gimpbaseconfig.h
	* app/config/gimpcoreconfig.h: use gint64 for all memsize properties.

	* app/base/tile-manager.[ch] (tile_manager_get_memsize): since
	tiles can be swapped out, a tilemanager can be larger than gsize
	(on 32bit platforms). Use a gint64 to avoid an overflow.

	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpbuffer.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdata.c
	* app/core/gimpdatafactory.c
	* app/core/gimpdrawable.c
	* app/core/gimpgradient.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpimage-undo.[ch]
	* app/core/gimpimage.c
	* app/core/gimpitem.c
	* app/core/gimpitemundo.[ch]
	* app/core/gimplayer.c
	* app/core/gimplist.c
	* app/core/gimpobject.[ch]
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/core/gimppattern.c
	* app/core/gimpundo.[ch]
	* app/core/gimpundostack.c
	* app/core/gimpviewable.c
	* app/text/gimptext.c
	* app/text/gimptextlayer.c
	* app/vectors/gimpstroke.c
	* app/vectors/gimpvectors.c: use gint64 for gimp_object_get_memsize()
	and all its implementations.

	* app/display/gimpdisplayshell-title.c
	* app/gui/info-window.c: changed accordingly.
parent 2ae924c3
2003-11-16 Sven Neumann <sven@gimp.org>
* app/config/gimpbaseconfig.h
* app/config/gimpcoreconfig.h: use gint64 for all memsize properties.
* app/base/tile-manager.[ch] (tile_manager_get_memsize): since
tiles can be swapped out, a tilemanager can be larger than gsize
(on 32bit platforms). Use a gint64 to avoid an overflow.
* app/core/gimp.c
* app/core/gimpbrush.c
* app/core/gimpbrushpipe.c
* app/core/gimpbuffer.c
* app/core/gimpchannel.c
* app/core/gimpcontainer.c
* app/core/gimpcontext.c
* app/core/gimpdata.c
* app/core/gimpdatafactory.c
* app/core/gimpdrawable.c
* app/core/gimpgradient.c
* app/core/gimpimage-undo-push.c
* app/core/gimpimage-undo.[ch]
* app/core/gimpimage.c
* app/core/gimpitem.c
* app/core/gimpitemundo.[ch]
* app/core/gimplayer.c
* app/core/gimplist.c
* app/core/gimpobject.[ch]
* app/core/gimppalette.c
* app/core/gimpparasitelist.c
* app/core/gimppattern.c
* app/core/gimpundo.[ch]
* app/core/gimpundostack.c
* app/core/gimpviewable.c
* app/text/gimptext.c
* app/text/gimptextlayer.c
* app/vectors/gimpstroke.c
* app/vectors/gimpvectors.c: use gint64 for gimp_object_get_memsize()
and all its implementations.
* app/display/gimpdisplayshell-title.c
* app/gui/info-window.c: changed accordingly.
2003-11-16 Manish Singh <yosh@gimp.org>
* libgimpwidgets/Makefile.am: added libgimpbase variable definition
......@@ -205,12 +205,12 @@ tile_manager_get (TileManager *tm,
(*tile_ptr)->write_count
); */
if (wantread)
if (wantread)
{
TILE_MUTEX_LOCK (*tile_ptr);
if (wantwrite)
if (wantwrite)
{
if ((*tile_ptr)->share_count > 1)
if ((*tile_ptr)->share_count > 1)
{
/* Copy-on-write required */
Tile *newtile = g_new (Tile, 1);
......@@ -234,7 +234,7 @@ tile_manager_get (TileManager *tm,
}
}
if ((*tile_ptr)->data != NULL)
if ((*tile_ptr)->data != NULL)
{
memcpy (newtile->data, (*tile_ptr)->data, tile_size (newtile));
}
......@@ -338,7 +338,7 @@ tile_manager_invalidate_tiles (TileManager *tm,
void
tile_invalidate_tile (Tile **tile_ptr,
TileManager *tm,
TileManager *tm,
gint xpixel,
gint ypixel)
{
......@@ -350,7 +350,7 @@ tile_invalidate_tile (Tile **tile_ptr,
tile_num = tile_manager_get_tile_num (tm, xpixel, ypixel);
if (tile_num < 0)
return;
tile_invalidate (tile_ptr, tm, tile_num);
}
......@@ -370,7 +370,7 @@ tile_invalidate (Tile **tile_ptr,
if (!tile->valid)
goto leave;
if (tile->share_count > 1)
if (tile->share_count > 1)
{
/* This tile is shared. Replace it with a new, invalid tile. */
Tile *newtile = g_new (Tile, 1);
......@@ -388,7 +388,7 @@ tile_invalidate (Tile **tile_ptr,
tile_cache_flush (tile);
tile->valid = FALSE;
if (tile->data)
if (tile->data)
{
g_free (tile->data);
tile->data = NULL;
......@@ -545,7 +545,7 @@ tile_manager_get_tile_num (TileManager *tm,
return tile_num;
}
void
void
tile_manager_set_user_data (TileManager *tm,
gpointer user_data)
{
......@@ -562,15 +562,15 @@ tile_manager_get_user_data (const TileManager *tm)
return tm->user_data;
}
gint
tile_manager_width (const TileManager *tm)
gint
tile_manager_width (const TileManager *tm)
{
g_return_val_if_fail (tm != NULL, 0);
return tm->width;
}
gint
gint
tile_manager_height (const TileManager *tm)
{
g_return_val_if_fail (tm != NULL, 0);
......@@ -578,10 +578,10 @@ tile_manager_height (const TileManager *tm)
return tm->height;
}
gint
gint
tile_manager_bpp (const TileManager *tm)
{
g_return_val_if_fail (tm != NULL, 0);
g_return_val_if_fail (tm != NULL, 0);
return tm->bpp;
}
......@@ -608,10 +608,10 @@ tile_manager_set_offsets (TileManager *tm,
tm->y = y;
}
gsize
gint64
tile_manager_get_memsize (const TileManager *tm)
{
gsize memsize = 0;
gint64 memsize = 0;
g_return_val_if_fail (tm != NULL, 0);
......@@ -634,12 +634,12 @@ tile_manager_get_tile_coordinates (TileManager *tm,
g_return_if_fail (tm != NULL);
g_return_if_fail (x != NULL && y != NULL);
for (tl = tile->tlink; tl; tl = tl->next)
for (tl = tile->tlink; tl; tl = tl->next)
{
if (tl->tm == tm) break;
}
if (tl == NULL)
if (tl == NULL)
{
g_warning ("tile_manager_get_tile_coordinates: tile not attached to manager");
return;
......@@ -649,7 +649,7 @@ tile_manager_get_tile_coordinates (TileManager *tm,
*y = TILE_HEIGHT * (tl->tile_num / tm->ntile_cols);
}
void
tile_manager_map_over_tile (TileManager *tm,
Tile *tile,
......@@ -661,12 +661,12 @@ tile_manager_map_over_tile (TileManager *tm,
g_return_if_fail (tile != NULL);
g_return_if_fail (srctile != NULL);
for (tl = tile->tlink; tl; tl = tl->next)
for (tl = tile->tlink; tl; tl = tl->next)
{
if (tl->tm == tm) break;
}
if (tl == NULL)
if (tl == NULL)
{
g_warning ("tile_manager_map_over_tile: tile not attached to manager");
return;
......@@ -675,7 +675,7 @@ tile_manager_map_over_tile (TileManager *tm,
tile_manager_map (tm, tl->tile_num, srctile);
}
PixelDataHandle *
PixelDataHandle *
request_pixel_data (TileManager *tm,
gint x1,
gint y1,
......@@ -698,26 +698,26 @@ request_pixel_data (TileManager *tm,
pdh->y2 = y2;
pdh->public.width = w = (x2-x1)+1;
pdh->public.height = h = (y2-y1)+1;
tile_num_1 = tile_manager_get_tile_num (tm, x1, y1);
tile_num_2 = tile_manager_get_tile_num (tm, x2, y2);
if (tile_num_1 == tile_num_2)
if (tile_num_1 == tile_num_2)
{
pdh->tile = tile_manager_get (tm, tile_num_1, wantread, wantwrite);
pdh->public.data = tile_data_pointer (pdh->tile, x1 % TILE_WIDTH, y1 % TILE_HEIGHT);
pdh->public.stride = tile_bpp (pdh->tile) * tile_ewidth (pdh->tile);
pdh->local_buffer = FALSE;
}
else
else
{
pdh->public.data = g_new (guchar, w * h * tm->bpp);
pdh->public.stride = tm->bpp * w;
pdh->local_buffer = TRUE;
pdh->tile = NULL;
if (wantread)
read_pixel_data (tm, x1, y1, x2, y2,
if (wantread)
read_pixel_data (tm, x1, y1, x2, y2,
pdh->public.data, pdh->public.stride);
}
return (PixelDataHandle *) pdh;
......@@ -728,14 +728,14 @@ release_pixel_data (PixelDataHandle *xpdh)
{
PixelDataHandlePrivate *pdh = (PixelDataHandlePrivate *)(xpdh);
if (pdh->local_buffer)
if (pdh->local_buffer)
{
if (pdh->writeable)
if (pdh->writeable)
write_pixel_data (pdh->tm, pdh->x1, pdh->y1, pdh->x2, pdh->y2,
pdh->public.data, pdh->public.stride);
g_free (pdh->public.data);
}
else
else
{
tile_release (pdh->tile, pdh->writeable);
}
......@@ -757,33 +757,33 @@ read_pixel_data (TileManager *tm,
Tile *t;
guchar *s, *d;
for (y = y1; y <= y2; y += TILE_HEIGHT - (y % TILE_HEIGHT))
for (x = x1; x <= x2; x += TILE_WIDTH - (x % TILE_WIDTH))
for (y = y1; y <= y2; y += TILE_HEIGHT - (y % TILE_HEIGHT))
for (x = x1; x <= x2; x += TILE_WIDTH - (x % TILE_WIDTH))
{
t = tile_manager_get_tile (tm, x, y, TRUE, FALSE);
s = tile_data_pointer (t, x % TILE_WIDTH, y % TILE_HEIGHT);
d = buffer + stride * (y - y1) + tm->bpp * (x - x1);
rows = tile_eheight (t) - y % TILE_HEIGHT;
if (rows > (y2 - y + 1))
if (rows > (y2 - y + 1))
rows = y2 - y + 1;
cols = tile_ewidth (t) - x % TILE_WIDTH;
if (cols > (x2 - x + 1))
cols = x2 - x + 1;
srcstride = tile_ewidth (t) * tile_bpp (t);
while (rows --)
while (rows --)
{
memcpy (d, s, cols * tm->bpp);
s += srcstride;
d += stride;
}
tile_release (t, FALSE);
}
}
void
write_pixel_data (TileManager *tm,
gint x1,
......@@ -799,29 +799,29 @@ write_pixel_data (TileManager *tm,
Tile *t;
guchar *s, *d;
for (y = y1; y <= y2; y += TILE_HEIGHT - (y % TILE_HEIGHT))
for (x = x1; x <= x2; x += TILE_WIDTH - (x % TILE_WIDTH))
for (y = y1; y <= y2; y += TILE_HEIGHT - (y % TILE_HEIGHT))
for (x = x1; x <= x2; x += TILE_WIDTH - (x % TILE_WIDTH))
{
t = tile_manager_get_tile (tm, x, y, TRUE, TRUE);
s = buffer + stride * (y - y1) + tm->bpp * (x - x1);
d = tile_data_pointer (t, x % TILE_WIDTH, y % TILE_HEIGHT);
rows = tile_eheight (t) - y % TILE_HEIGHT;
if (rows > (y2 - y + 1))
if (rows > (y2 - y + 1))
rows = y2 - y + 1;
cols = tile_ewidth (t) - x % TILE_WIDTH;
if (cols > (x2 - x + 1))
cols = x2 - x + 1;
dststride = tile_ewidth (t) * tile_bpp (t);
while (rows --)
while (rows --)
{
memcpy (d, s, cols * tm->bpp);
s += stride;
d += dststride;
}
tile_release (t, TRUE);
}
}
......@@ -831,20 +831,20 @@ read_pixel_data_1 (TileManager *tm,
gint x,
gint y,
guchar *buffer)
{
{
if (x >= 0 && y >= 0 && x < tm->width && y < tm->height)
{
gint num = tile_manager_get_tile_num (tm, x, y);
if (num != tm->cached_num) /* must fetch a new tile */
{
{
if (tm->cached_tile)
tile_release (tm->cached_tile, FALSE);
tm->cached_num = num;
tm->cached_tile = tile_manager_get (tm, num, TRUE, FALSE);
}
if (tm->cached_tile)
{
guchar *data = tile_data_pointer (tm->cached_tile,
......@@ -861,7 +861,7 @@ read_pixel_data_1 (TileManager *tm,
buffer[i] = data[i];
}
break;
}
}
}
}
}
......@@ -879,4 +879,4 @@ write_pixel_data_1 (TileManager *tm,
d = tile_data_pointer (t, x % TILE_WIDTH, y % TILE_HEIGHT);
memcpy (d, buffer, tm->bpp);
tile_release (t, TRUE);
}
}
......@@ -19,7 +19,7 @@
#ifndef __TILE_MANAGER_H__
#define __TILE_MANAGER_H__
struct _PixelDataHandle
struct _PixelDataHandle
{
guchar *data;
gint width;
......@@ -56,7 +56,7 @@ void tile_manager_unref (TileManager *tm);
void tile_manager_set_validate_proc (TileManager *tm,
TileValidateProc proc);
/* Get a specified tile from a tile manager.
/* Get a specified tile from a tile manager.
*/
Tile * tile_manager_get_tile (TileManager *tm,
gint xpixel,
......@@ -98,7 +98,7 @@ void tile_invalidate (Tile **tile_ptr,
TileManager *tm,
gint tile_num);
void tile_invalidate_tile (Tile **tile_ptr,
TileManager *tm,
TileManager *tm,
gint xpixel,
gint ypixel);
......@@ -123,7 +123,7 @@ void tile_manager_set_offsets (TileManager *tm,
gint x,
gint y);
gsize tile_manager_get_memsize (const TileManager *tm);
gint64 tile_manager_get_memsize (const TileManager *tm);
void tile_manager_get_tile_coordinates (TileManager *tm,
Tile *tile,
......
......@@ -42,7 +42,7 @@ struct _GimpBaseConfig
gchar *swap_path;
gboolean stingy_memory_use;
guint num_processors;
gulong tile_cache_size;
guint64 tile_cache_size;
};
struct _GimpBaseConfigClass
......
......@@ -57,7 +57,7 @@ struct _GimpCoreConfig
GimpTemplate *default_image;
GimpGrid *default_grid;
gint levels_of_undo;
gulong undo_size;
guint64 undo_size;
gchar *plug_in_rc_path;
gboolean layer_previews;
GimpPreviewSize layer_preview_size;
......
......@@ -88,8 +88,8 @@ static void gimp_init (Gimp *gimp);
static void gimp_dispose (GObject *object);
static void gimp_finalize (GObject *object);
static gsize gimp_get_memsize (GimpObject *object,
gsize *gui_size);
static gint64 gimp_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_real_initialize (Gimp *gimp,
GimpInitStatusFunc status_callback);
......@@ -484,12 +484,12 @@ gimp_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gsize
static gint64
gimp_get_memsize (GimpObject *object,
gsize *gui_size)
gint64 *gui_size)
{
Gimp *gimp;
gsize memsize = 0;
Gimp *gimp;
gint64 memsize = 0;
gimp = GIMP (object);
......
......@@ -71,8 +71,8 @@ static void gimp_brush_init (GimpBrush *brush);
static void gimp_brush_finalize (GObject *object);
static gsize gimp_brush_get_memsize (GimpObject *object,
gsize *gui_size);
static gint64 gimp_brush_get_memsize (GimpObject *object,
gint64 *gui_size);
static gboolean gimp_brush_get_popup_size (GimpViewable *viewable,
gint width,
......@@ -202,12 +202,12 @@ gimp_brush_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gsize
static gint64
gimp_brush_get_memsize (GimpObject *object,
gsize *gui_size)
gint64 *gui_size)
{
GimpBrush *brush;
gsize memsize = 0;
gint64 memsize = 0;
brush = GIMP_BRUSH (object);
......
......@@ -71,8 +71,8 @@ static void gimp_brush_init (GimpBrush *brush);
static void gimp_brush_finalize (GObject *object);
static gsize gimp_brush_get_memsize (GimpObject *object,
gsize *gui_size);
static gint64 gimp_brush_get_memsize (GimpObject *object,
gint64 *gui_size);
static gboolean gimp_brush_get_popup_size (GimpViewable *viewable,
gint width,
......@@ -202,12 +202,12 @@ gimp_brush_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gsize
static gint64
gimp_brush_get_memsize (GimpObject *object,
gsize *gui_size)
gint64 *gui_size)
{
GimpBrush *brush;
gsize memsize = 0;
gint64 memsize = 0;
brush = GIMP_BRUSH (object);
......
......@@ -60,8 +60,8 @@ static void gimp_brush_pipe_init (GimpBrushPipe *pipe);
static void gimp_brush_pipe_finalize (GObject *object);
static gsize gimp_brush_pipe_get_memsize (GimpObject *object,
gsize *gui_size);
static gint64 gimp_brush_pipe_get_memsize (GimpObject *object,
gint64 *gui_size);
static gboolean gimp_brush_pipe_get_popup_size (GimpViewable *viewable,
gint width,
......@@ -196,12 +196,12 @@ gimp_brush_pipe_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gsize
static gint64
gimp_brush_pipe_get_memsize (GimpObject *object,
gsize *gui_size)
gint64 *gui_size)
{
GimpBrushPipe *pipe;
gsize memsize = 0;
gint64 memsize = 0;
gint i;
pipe = GIMP_BRUSH_PIPE (object);
......
......@@ -60,8 +60,8 @@ static void gimp_brush_pipe_init (GimpBrushPipe *pipe);
static void gimp_brush_pipe_finalize (GObject *object);
static gsize gimp_brush_pipe_get_memsize (GimpObject *object,
gsize *gui_size);
static gint64 gimp_brush_pipe_get_memsize (GimpObject *object,
gint64 *gui_size);
static gboolean gimp_brush_pipe_get_popup_size (GimpViewable *viewable,
gint width,
......@@ -196,12 +196,12 @@ gimp_brush_pipe_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gsize
static gint64
gimp_brush_pipe_get_memsize (GimpObject *object,
gsize *gui_size)
gint64 *gui_size)
{
GimpBrushPipe *pipe;
gsize memsize = 0;
gint64 memsize = 0;
gint i;
pipe = GIMP_BRUSH_PIPE (object);
......
......@@ -38,8 +38,8 @@ static void gimp_buffer_init (GimpBuffer *buffer);
static void gimp_buffer_finalize (GObject *object);
static gsize gimp_buffer_get_memsize (GimpObject *object,
gsize *gui_size);
static gint64 gimp_buffer_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_buffer_get_preview_size (GimpViewable *viewable,
gint size,
......@@ -136,12 +136,12 @@ gimp_buffer_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gsize
static gint64
gimp_buffer_get_memsize (GimpObject *object,
gsize *gui_size)
gint64 *gui_size)
{
GimpBuffer *buffer;
gsize memsize = 0;
gint64 memsize = 0;
buffer = GIMP_BUFFER (object);
......
......@@ -57,8 +57,8 @@ static void gimp_channel_init (GimpChannel *channel);
static void gimp_channel_finalize (GObject *object);
static gsize gimp_channel_get_memsize (GimpObject *object,
gsize *gui_size);
static gint64 gimp_channel_get_memsize (GimpObject *object,
gint64 *gui_size);
static GimpItem * gimp_channel_duplicate (GimpItem *item,
GType new_type,
......@@ -306,13 +306,11 @@ gimp_channel_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gsize
static gint64
gimp_channel_get_memsize (GimpObject *object,
gsize *gui_size)
gint64 *gui_size)
{
GimpChannel *channel;
channel = GIMP_CHANNEL (object);
GimpChannel *channel = GIMP_CHANNEL (object);
*gui_size += channel->num_segs_in * sizeof (BoundSeg);
*gui_size += channel->num_segs_out * sizeof (BoundSeg);
......@@ -463,9 +461,7 @@ gimp_channel_scale (GimpItem *item,
gint new_offset_y,
GimpInterpolationType interpolation_type)
{
GimpChannel *channel;
channel = GIMP_CHANNEL (item);
GimpChannel *channel = GIMP_CHANNEL (item);
gimp_image_undo_push_channel_mod (gimp_item_get_image (item),
_("Scale Channel"),
......@@ -492,9 +488,7 @@ gimp_channel_resize (GimpItem *item,
gint offset_x,
gint offset_y)
{
GimpChannel *channel;
channel = GIMP_CHANNEL (item);
GimpChannel *channel = GIMP_CHANNEL (item);
gimp_image_undo_push_channel_mod (gimp_item_get_image (item),
_("Resize Channel"),
......
......@@ -98,8 +98,8 @@ static void gimp_container_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
static gsize gimp_container_get_memsize (GimpObject *object,
gsize *gui_size);
static gint64 gimp_container_get_memsize (GimpObject *object,
gint64 *gui_size);
static gboolean gimp_container_serialize (GimpConfig *config,
GimpConfigWriter *writer,
......@@ -337,13 +337,13 @@ gimp_container_get_property (GObject *object,
}
}
static gsize
static gint64
gimp_container_get_memsize (GimpObject *object,
gsize *gui_size)
gint64 *gui_size)
{
GimpContainer *container;
GList *list;
gsize memsize = 0;
gint64 memsize = 0;
container = GIMP_CONTAINER (object);
......
......@@ -87,8 +87,8 @@ static void gimp_context_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static gsize gimp_context_get_memsize (GimpObject *object,
gsize *gui_size);
static gint64 gimp_context_get_memsize (GimpObject *object,
gint64 *gui_size);
static gboolean gimp_context_serialize (GimpConfig *config,
GimpConfigWriter *writer,
......@@ -1044,12 +1044,12 @@ gimp_context_get_property (GObject *object,
}
}
static gsize
static gint64
gimp_context_get_memsize (GimpObject *object,
gsize *gui_size)
gint64 *gui_size)
{
GimpContext *context = GIMP_CONTEXT (object);
gsize memsize = 0;
gint64 memsize = 0;
if (context->tool_name)
memsize += strlen (context->tool_name) + 1;
......
......@@ -63,8 +63,8 @@ static void gimp_data_init (GimpData *data);
static void gimp_data_finalize (GObject *object);
static void gimp_data_name_changed (GimpObject *object);
static gsize gimp_data_get_memsize (GimpObject *object,
gsize *gui_size);
static gint64 gimp_data_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_data_real_dirty (GimpData *data);
......@@ -167,12 +167,12 @@ gimp_data_name_changed (GimpObject *object)
gimp_data_dirty (GIMP_DATA (object));
}
static gsize
static gint64
gimp_data_get_memsize (GimpObject *object,
gsize *gui_size)
gint64 *gui_size)
{
GimpData *data;
gsize memsize = 0;
gint64 memsize = 0;
data = GIMP_DATA (object);
......
......@@ -47,8 +47,8 @@ static void gimp_data_factory_init (GimpDataFactory *factory);
static void gimp_data_factory_finalize (GObject *object);
static gsize gimp_data_factory_get_memsize (GimpObject *object,
gsize *gui_size);
static gint64 gimp_data_factory_get_memsize (GimpObject *object,
gint64 *gui_size);