From 90784da01b4ae45814fbf9ce24c56561be3a4573 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Thu, 13 Jul 2000 00:09:56 +0000 Subject: [PATCH] default initialize the temporary default value, instead of nuking the Thu Jul 13 02:07:54 2000 Tim Janik * gparam.c (g_param_value_defaults): default initialize the temporary default value, instead of nuking the caller's value contents. --- gobject/ChangeLog | 5 +++++ gobject/gparam.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gobject/ChangeLog b/gobject/ChangeLog index f20b81edb..980ba8012 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,8 @@ +Thu Jul 13 02:07:54 2000 Tim Janik + + * gparam.c (g_param_value_defaults): default initialize the temporary + default value, instead of nuking the caller's value contents. + 2000-07-11 Raja R Harinath * gtype.c (g_type_get_plugin): Don't return just 0 or 1. diff --git a/gobject/gparam.c b/gobject/gparam.c index 7d0199ef8..b35c407a5 100644 --- a/gobject/gparam.c +++ b/gobject/gparam.c @@ -222,7 +222,7 @@ g_param_value_defaults (GParamSpec *pspec, g_return_val_if_fail (G_IS_PARAM_VALUE (pspec, value), FALSE); g_value_init (&dflt_value, G_PARAM_SPEC_VALUE_TYPE (pspec)); - G_PARAM_SPEC_GET_CLASS (pspec)->value_set_default (pspec, value); + G_PARAM_SPEC_GET_CLASS (pspec)->value_set_default (pspec, &dflt_value); defaults = G_PARAM_SPEC_GET_CLASS (pspec)->values_cmp (pspec, value, &dflt_value) == 0; g_value_unset (&dflt_value);