default initialize the temporary default value, instead of nuking the

Thu Jul 13 02:07:54 2000  Tim Janik  <timj@gtk.org>

        * gparam.c (g_param_value_defaults): default initialize the temporary
        default value, instead of nuking the caller's value contents.
This commit is contained in:
Tim Janik 2000-07-13 00:09:56 +00:00 committed by Tim Janik
parent c38d1dd9e9
commit 90784da01b
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Thu Jul 13 02:07:54 2000 Tim Janik <timj@gtk.org>
* 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 <harinath@cs.umn.edu> 2000-07-11 Raja R Harinath <harinath@cs.umn.edu>
* gtype.c (g_type_get_plugin): Don't return just 0 or 1. * gtype.c (g_type_get_plugin): Don't return just 0 or 1.

View File

@ -222,7 +222,7 @@ g_param_value_defaults (GParamSpec *pspec,
g_return_val_if_fail (G_IS_PARAM_VALUE (pspec, value), FALSE); g_return_val_if_fail (G_IS_PARAM_VALUE (pspec, value), FALSE);
g_value_init (&dflt_value, G_PARAM_SPEC_VALUE_TYPE (pspec)); 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; defaults = G_PARAM_SPEC_GET_CLASS (pspec)->values_cmp (pspec, value, &dflt_value) == 0;
g_value_unset (&dflt_value); g_value_unset (&dflt_value);