gegl r1922 - in trunk: . gegl
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r1922 - in trunk: . gegl
- Date: Mon, 28 Jan 2008 11:39:35 +0000 (GMT)
Author: neo
Date: Mon Jan 28 11:39:35 2008
New Revision: 1922
URL: http://svn.gnome.org/viewvc/gegl?rev=1922&view=rev
Log:
2008-01-28 Sven Neumann <sven gimp org>
* gegl/gegl-chant.h: Allocate the GeglChant0 struct using GSlice.
Removed redundant G_IS_OBJECT() checks.
Modified:
trunk/ChangeLog
trunk/gegl/gegl-chant.h
Modified: trunk/gegl/gegl-chant.h
==============================================================================
--- trunk/gegl/gegl-chant.h (original)
+++ trunk/gegl/gegl-chant.h Mon Jan 28 11:39:35 2008
@@ -471,19 +471,19 @@
break;
#define gegl_chant_color(name, def, blurb) \
case PROP_##name: \
- if (properties->name != NULL && G_IS_OBJECT (properties->name)) \
+ if (properties->name != NULL) \
g_object_unref (properties->name); \
properties->name = g_value_dup_object (value); \
break;
#define gegl_chant_curve(name, blurb) \
case PROP_##name: \
- if (properties->name != NULL && G_IS_OBJECT (properties->name)) \
+ if (properties->name != NULL) \
g_object_unref (properties->name); \
properties->name = g_value_dup_object (value); \
break;
#define gegl_chant_vector(name, blurb) \
case PROP_##name: \
- if (properties->name != NULL && G_IS_OBJECT (properties->name)) \
+ if (properties->name != NULL) \
{/*XXX: remove old signal */ \
g_object_unref (properties->name); \
} \
@@ -514,9 +514,7 @@
static void gegl_chant_destroy_notify (gpointer data)
{
- GeglChantO *properties;
-
- properties = GEGL_CHANT_PROPERTIES (data);
+ GeglChantO *properties = GEGL_CHANT_PROPERTIES (data);
#define gegl_chant_int(name, min, max, def, blurb)
#define gegl_chant_double(name, min, max, def, blurb)
@@ -578,7 +576,8 @@
#undef gegl_chant_color
#undef gegl_chant_curve
#undef gegl_chant_vector
- g_free (properties);
+
+ g_slice_free (GeglChantO, properties);
}
static GObject *
@@ -715,7 +714,7 @@
static void
gegl_chant_init (GeglChant *self)
{
- self->properties = g_new0 (GeglChantO, 1);
+ self->properties = g_slice_new0 (GeglChantO);
}
/****************************************************************************/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]