[gtk+] Use faster new G_VALUE_COLLECT_INIT variant instead G_VALUE_COLLECT
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Use faster new G_VALUE_COLLECT_INIT variant instead G_VALUE_COLLECT
- Date: Mon, 7 Feb 2011 13:15:16 +0000 (UTC)
commit db97f8660abd2e386d1dbedf14fc615f1d52acac
Author: Javier Jardón <jjardon gnome org>
Date: Sat Feb 5 17:54:02 2011 +0000
Use faster new G_VALUE_COLLECT_INIT variant instead G_VALUE_COLLECT
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=641621
gtk/gtkcellarea.c | 4 ++--
gtk/gtkcontainer.c | 5 +++--
gtk/gtkliststore.c | 4 ++--
gtk/gtkstyleproperties.c | 5 ++---
gtk/gtktreestore.c | 4 ++--
5 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkcellarea.c b/gtk/gtkcellarea.c
index 56cb0a3..3050ff5 100644
--- a/gtk/gtkcellarea.c
+++ b/gtk/gtkcellarea.c
@@ -2671,8 +2671,8 @@ gtk_cell_area_cell_set_valist (GtkCellArea *area,
break;
}
- g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
- G_VALUE_COLLECT (&value, var_args, 0, &error);
+ G_VALUE_COLLECT_INIT (&value, G_PARAM_SPEC_VALUE_TYPE (pspec),
+ var_args, 0, &error);
if (error)
{
g_warning ("%s: %s", G_STRLOC, error);
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 18f046c..ad38941 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -1004,8 +1004,9 @@ gtk_container_child_set_valist (GtkContainer *container,
G_OBJECT_TYPE_NAME (container));
break;
}
- g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
- G_VALUE_COLLECT (&value, var_args, 0, &error);
+
+ G_VALUE_COLLECT_INIT (&value, G_PARAM_SPEC_VALUE_TYPE (pspec),
+ var_args, 0, &error);
if (error)
{
g_warning ("%s: %s", G_STRLOC, error);
diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c
index 2c576bb..1d39e8e 100644
--- a/gtk/gtkliststore.c
+++ b/gtk/gtkliststore.c
@@ -875,9 +875,9 @@ gtk_list_store_set_valist_internal (GtkListStore *list_store,
g_warning ("%s: Invalid column number %d added to iter (remember to end your list of columns with a -1)", G_STRLOC, column);
break;
}
- g_value_init (&value, priv->column_headers[column]);
- G_VALUE_COLLECT (&value, var_args, 0, &error);
+ G_VALUE_COLLECT_INIT (&value, priv->column_headers[column],
+ var_args, 0, &error);
if (error)
{
g_warning ("%s: %s", G_STRLOC, error);
diff --git a/gtk/gtkstyleproperties.c b/gtk/gtkstyleproperties.c
index f3a325d..38ededc 100644
--- a/gtk/gtkstyleproperties.c
+++ b/gtk/gtkstyleproperties.c
@@ -736,9 +736,8 @@ gtk_style_properties_set_valist (GtkStyleProperties *props,
if (G_IS_VALUE (val))
g_value_unset (val);
- g_value_init (val, node->pspec->value_type);
- G_VALUE_COLLECT (val, args, 0, &error);
-
+ G_VALUE_COLLECT_INIT (val, node->pspec->value_type,
+ args, 0, &error);
if (error)
{
g_warning ("Could not set style property \"%s\": %s", property_name, error);
diff --git a/gtk/gtktreestore.c b/gtk/gtktreestore.c
index 29544d2..a1a91c2 100644
--- a/gtk/gtktreestore.c
+++ b/gtk/gtktreestore.c
@@ -1041,9 +1041,9 @@ gtk_tree_store_set_valist_internal (GtkTreeStore *tree_store,
g_warning ("%s: Invalid column number %d added to iter (remember to end your list of columns with a -1)", G_STRLOC, column);
break;
}
- g_value_init (&value, priv->column_headers[column]);
- G_VALUE_COLLECT (&value, var_args, 0, &error);
+ G_VALUE_COLLECT_INIT (&value, priv->column_headers[column],
+ var_args, 0, &error);
if (error)
{
g_warning ("%s: %s", G_STRLOC, error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]