[glib] gio: Use G_VALUE_INIT
- From: Javier JardÃn <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gio: Use G_VALUE_INIT
- Date: Tue, 18 Oct 2011 16:17:16 +0000 (UTC)
commit 8d3250016dac9d43b2a2de6dacb670a9fbc88808
Author: Javier JardÃn <jjardon gnome org>
Date: Fri Sep 30 17:08:15 2011 +0100
gio: Use G_VALUE_INIT
gio/gasynchelper.c | 4 ++--
gio/gcancellable.c | 4 ++--
gio/gdbus-2.0/codegen/codegen.py | 6 +++---
gio/gdbusnameowning.c | 6 +++---
gio/gdbusnamewatching.c | 4 ++--
gio/gpollableinputstream.c | 4 ++--
gio/gsettings.c | 4 ++--
gio/gsocket.c | 4 ++--
8 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/gio/gasynchelper.c b/gio/gasynchelper.c
index fa63dfe..4928115 100644
--- a/gio/gasynchelper.c
+++ b/gio/gasynchelper.c
@@ -87,8 +87,8 @@ fd_source_closure_callback (int fd,
{
GClosure *closure = data;
- GValue params[2] = { { 0, }, { 0, } };
- GValue result_value = { 0, };
+ GValue params[2] = { G_VALUE_INIT, G_VALUE_INIT };
+ GValue result_value = G_VALUE_INIT;
gboolean result;
g_value_init (&result_value, G_TYPE_BOOLEAN);
diff --git a/gio/gcancellable.c b/gio/gcancellable.c
index 1a67858..06d2fa7 100644
--- a/gio/gcancellable.c
+++ b/gio/gcancellable.c
@@ -679,8 +679,8 @@ cancellable_source_closure_callback (GCancellable *cancellable,
{
GClosure *closure = data;
- GValue params = { 0, };
- GValue result_value = { 0, };
+ GValue params = G_VALUE_INIT;
+ GValue result_value = G_VALUE_INIT;
gboolean result;
g_value_init (&result_value, G_TYPE_BOOLEAN);
diff --git a/gio/gdbus-2.0/codegen/codegen.py b/gio/gdbus-2.0/codegen/codegen.py
index cb9d775..8d34bdd 100644
--- a/gio/gdbus-2.0/codegen/codegen.py
+++ b/gio/gdbus-2.0/codegen/codegen.py
@@ -2086,7 +2086,7 @@ class CodeGenerator:
' guint num_extra;\n'
' guint n;\n'
' guint signal_id;\n'
- ' GValue return_value = {0};\n'
+ ' GValue return_value = G_VALUE_INIT;\n'
%(i.name_lower, i.camel_name, i.ns_upper, i.name_upper))
self.c.write(' info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);\n'
' g_assert (info != NULL);\n'
@@ -2149,7 +2149,7 @@ class CodeGenerator:
' gpointer user_data)\n'
'{\n'
' %sSkeleton *skeleton = %s%s_SKELETON (user_data);\n'
- ' GValue value = {0};\n'
+ ' GValue value = G_VALUE_INIT;\n'
' GParamSpec *pspec;\n'
' _ExtendedGDBusPropertyInfo *info;\n'
' GVariant *ret;\n'
@@ -2186,7 +2186,7 @@ class CodeGenerator:
' gpointer user_data)\n'
'{\n'
' %sSkeleton *skeleton = %s%s_SKELETON (user_data);\n'
- ' GValue value = {0};\n'
+ ' GValue value = G_VALUE_INIT;\n'
' GParamSpec *pspec;\n'
' _ExtendedGDBusPropertyInfo *info;\n'
' gboolean ret;\n'
diff --git a/gio/gdbusnameowning.c b/gio/gdbusnameowning.c
index 4b1c01a..65b1227 100644
--- a/gio/gdbusnameowning.c
+++ b/gio/gdbusnameowning.c
@@ -675,7 +675,7 @@ own_with_closures_on_bus_acquired (GDBusConnection *connection,
gpointer user_data)
{
OwnNameData *data = user_data;
- GValue params[2] = { { 0, }, { 0, } };
+ GValue params[2] = { G_VALUE_INIT, G_VALUE_INIT };
g_value_init (¶ms[0], G_TYPE_DBUS_CONNECTION);
g_value_set_object (¶ms[0], connection);
@@ -695,7 +695,7 @@ own_with_closures_on_name_acquired (GDBusConnection *connection,
gpointer user_data)
{
OwnNameData *data = user_data;
- GValue params[2] = { { 0, }, { 0, } };
+ GValue params[2] = { G_VALUE_INIT, G_VALUE_INIT };
g_value_init (¶ms[0], G_TYPE_DBUS_CONNECTION);
g_value_set_object (¶ms[0], connection);
@@ -715,7 +715,7 @@ own_with_closures_on_name_lost (GDBusConnection *connection,
gpointer user_data)
{
OwnNameData *data = user_data;
- GValue params[2] = { { 0, }, { 0, } };
+ GValue params[2] = { G_VALUE_INIT, G_VALUE_INIT };
g_value_init (¶ms[0], G_TYPE_DBUS_CONNECTION);
g_value_set_object (¶ms[0], connection);
diff --git a/gio/gdbusnamewatching.c b/gio/gdbusnamewatching.c
index 3f1f544..bdda901 100644
--- a/gio/gdbusnamewatching.c
+++ b/gio/gdbusnamewatching.c
@@ -687,7 +687,7 @@ watch_with_closures_on_name_appeared (GDBusConnection *connection,
gpointer user_data)
{
WatchNameData *data = user_data;
- GValue params[3] = { { 0, }, { 0, }, { 0, } };
+ GValue params[3] = { G_VALUE_INIT, G_VALUE_INIT, G_VALUE_INIT };
g_value_init (¶ms[0], G_TYPE_DBUS_CONNECTION);
g_value_set_object (¶ms[0], connection);
@@ -711,7 +711,7 @@ watch_with_closures_on_name_vanished (GDBusConnection *connection,
gpointer user_data)
{
WatchNameData *data = user_data;
- GValue params[2] = { { 0, }, { 0, } };
+ GValue params[2] = { G_VALUE_INIT, G_VALUE_INIT };
g_value_init (¶ms[0], G_TYPE_DBUS_CONNECTION);
g_value_set_object (¶ms[0], connection);
diff --git a/gio/gpollableinputstream.c b/gio/gpollableinputstream.c
index 6bad2a0..199169d 100644
--- a/gio/gpollableinputstream.c
+++ b/gio/gpollableinputstream.c
@@ -246,8 +246,8 @@ pollable_source_closure_callback (GObject *stream,
{
GClosure *closure = data;
- GValue param = { 0, };
- GValue result_value = { 0, };
+ GValue param = G_VALUE_INIT;
+ GValue result_value = G_VALUE_INIT;
gboolean result;
g_value_init (&result_value, G_TYPE_BOOLEAN);
diff --git a/gio/gsettings.c b/gio/gsettings.c
index cf1d23a..4f6b2f4 100644
--- a/gio/gsettings.c
+++ b/gio/gsettings.c
@@ -2522,7 +2522,7 @@ g_settings_binding_key_changed (GSettings *settings,
gpointer user_data)
{
GSettingsBinding *binding = user_data;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
GVariant *variant;
g_assert (settings == binding->info.settings);
@@ -2582,7 +2582,7 @@ g_settings_binding_property_changed (GObject *object,
gpointer user_data)
{
GSettingsBinding *binding = user_data;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
GVariant *variant;
g_assert (object == binding->object);
diff --git a/gio/gsocket.c b/gio/gsocket.c
index c3c1ac6..8713ca9 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -2536,8 +2536,8 @@ socket_source_closure_callback (GSocket *socket,
{
GClosure *closure = data;
- GValue params[2] = { { 0, }, { 0, } };
- GValue result_value = { 0, };
+ GValue params[2] = { G_VALUE_INIT, G_VALUE_INIT };
+ GValue result_value = G_VALUE_INIT;
gboolean result;
g_value_init (&result_value, G_TYPE_BOOLEAN);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]