[gtk+/wip/css: 5/37] css: Initialize values to their specified type
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/css: 5/37] css: Initialize values to their specified type
- Date: Mon, 23 Jan 2012 15:36:05 +0000 (UTC)
commit 6a34c8bf756a562d6d58ac5be6aedaceb9267e00
Author: Benjamin Otte <otte redhat com>
Date: Sat Jan 14 04:39:07 2012 +0100
css: Initialize values to their specified type
.. when parsing.
gtk/gtkcssstyleproperty.c | 2 +-
gtk/gtkcssstylepropertyimpl.c | 2 --
2 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcssstyleproperty.c b/gtk/gtkcssstyleproperty.c
index 9468038..9743b88 100644
--- a/gtk/gtkcssstyleproperty.c
+++ b/gtk/gtkcssstyleproperty.c
@@ -201,7 +201,7 @@ gtk_css_style_property_parse_value (GtkStyleProperty *property,
return TRUE;
}
- g_value_init (value, _gtk_style_property_get_value_type (property));
+ g_value_init (value, _gtk_css_style_property_get_specified_type (style_property));
if (!(* style_property->parse_value) (style_property, value, parser, base))
{
g_value_unset (value);
diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c
index 24e3d8e..6bfd681 100644
--- a/gtk/gtkcssstylepropertyimpl.c
+++ b/gtk/gtkcssstylepropertyimpl.c
@@ -418,8 +418,6 @@ css_image_value_parse (GtkCssStyleProperty *property,
return FALSE;
}
- g_value_unset (value);
- g_value_init (value, GTK_TYPE_CSS_IMAGE);
g_value_take_object (value, image);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]