/* Returns: TRUE if transformation and validation were successful, FALSE otherwise and @dest_value is left untouched.  */
gboolean g_param_value_convert(GParamSpec *pspec, const GValue *src_value, GValue *dest_value, gboolean strict_validation)
/* Returns: TRUE if transformation and validation were successful, FALSE otherwise and @dest_value is left untouched.  */
gboolean g_param_value_convert(GParamSpec *pspec, const GValue *src_value, GValue *dest_value, gboolean strict_validation)
{
  GValue tmp_value = G_VALUE_INIT;
  g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), FALSE);
  g_return_val_if_fail (G_IS_VALUE (src_value), FALSE);
  g_return_val_if_fail (G_IS_VALUE (dest_value), FALSE);
  g_return_val_if_fail (PSPEC_APPLIES_TO_VALUE (pspec, dest_value), FALSE);
  g_value_init (&tmp_value, G_VALUE_TYPE (dest_value));
  if (g_value_transform (src_value, &tmp_value) &&
      (!g_param_value_validate (pspec, &tmp_value) || !strict_validation))
    {
      g_value_unset (dest_value);
      memcpy (dest_value, &tmp_value, sizeof (tmp_value));
      return TRUE;
    }
  else
    {
      g_value_unset (&tmp_value);
      return FALSE;
    }
}