[glib] gio: Fix deprecation warnings for g_object_newv() API
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gio: Fix deprecation warnings for g_object_newv() API
- Date: Fri, 31 Mar 2017 10:01:29 +0000 (UTC)
commit c11908ab7da12a84cd30ff666e959ea24a9ff9ae
Author: Philip Withnall <withnall endlessm com>
Date: Fri Mar 31 10:59:26 2017 +0100
gio: Fix deprecation warnings for g_object_newv() API
gio/gasyncinitable.c | 2 ++
gio/ginitable.c | 2 ++
gio/tests/network-monitor.c | 3 ++-
3 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gio/gasyncinitable.c b/gio/gasyncinitable.c
index cd970cf..87980bc 100644
--- a/gio/gasyncinitable.c
+++ b/gio/gasyncinitable.c
@@ -382,7 +382,9 @@ g_async_initable_newv_async (GType object_type,
g_return_if_fail (G_TYPE_IS_ASYNC_INITABLE (object_type));
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
obj = g_object_newv (object_type, n_parameters, parameters);
+G_GNUC_END_IGNORE_DEPRECATIONS
g_async_initable_init_async (G_ASYNC_INITABLE (obj),
io_priority, cancellable,
diff --git a/gio/ginitable.c b/gio/ginitable.c
index 266fbb8..4784e2c 100644
--- a/gio/ginitable.c
+++ b/gio/ginitable.c
@@ -198,7 +198,9 @@ g_initable_newv (GType object_type,
g_return_val_if_fail (G_TYPE_IS_INITABLE (object_type), NULL);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
obj = g_object_newv (object_type, n_parameters, parameters);
+G_GNUC_END_IGNORE_DEPRECATIONS
if (!g_initable_init (G_INITABLE (obj), cancellable, error))
{
diff --git a/gio/tests/network-monitor.c b/gio/tests/network-monitor.c
index 2e38e39..b20c46f 100644
--- a/gio/tests/network-monitor.c
+++ b/gio/tests/network-monitor.c
@@ -241,7 +241,8 @@ test_default (void)
m = g_network_monitor_get_default ();
g_assert (G_IS_NETWORK_MONITOR (m));
- monitor = g_initable_newv (G_TYPE_NETWORK_MONITOR_BASE, 0, NULL, NULL, &error);
+ monitor = g_object_new (G_TYPE_NETWORK_MONITOR_BASE, NULL);
+ g_initable_init (G_INITABLE (monitor), NULL, &error);
g_assert_no_error (error);
/* In the default configuration, all addresses are reachable */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]