* gparamspecs.c: (param_gtype_set_default), (param_gtype_validate):
make GParamGType require the set type during construction instead of
using G_TYPE_NONE, which causes issues when setting.
Bug 513073 - g_param_spec_gtype breaks with G_PARAM_CONSTRUCT
svn path=/trunk/; revision=6457
+2008-02-06 Benjamin Otte <otte@gnome.org>
+
+ * gparamspecs.c: (param_gtype_set_default), (param_gtype_validate):
+ make GParamGType require the set type during construction instead of
+ using G_TYPE_NONE, which causes issues when setting.
+ Bug 513073 - g_param_spec_gtype breaks with G_PARAM_CONSTRUCT
+
2008-02-05 18:52:07 Tim Janik <timj@imendio.com>
* gtype.c: added recursive mutex to protect class initialization,
param_gtype_set_default (GParamSpec *pspec,
GValue *value)
{
- value->data[0].v_long = G_TYPE_NONE;
+ GParamSpecGType *tspec = G_PARAM_SPEC_GTYPE (pspec);
+
+ value->data[0].v_long = tspec->is_a_type;
}
static gboolean
if (tspec->is_a_type != G_TYPE_NONE && !g_type_is_a (gtype, tspec->is_a_type))
{
- value->data[0].v_long = G_TYPE_NONE;
+ value->data[0].v_long = tspec->is_a_type;
changed++;
}