[grilo] net: Remove deprecated g_type_class_add_private()
- From: Victor Toso <victortoso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] net: Remove deprecated g_type_class_add_private()
- Date: Wed, 25 Jul 2018 11:35:34 +0000 (UTC)
commit 06cd3944cc0a81a46c983f21a3bb6bc0266745c8
Author: Victor Toso <me victortoso com>
Date: Wed Jul 25 00:15:45 2018 +0200
net: Remove deprecated g_type_class_add_private()
Similar to previous commit but for the libs. Only the net library uses
g_type_class_add_private().
libs/net/grl-net-wc.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/libs/net/grl-net-wc.c b/libs/net/grl-net-wc.c
index 36ae4c2..b52c86c 100644
--- a/libs/net/grl-net-wc.c
+++ b/libs/net/grl-net-wc.c
@@ -90,18 +90,13 @@ struct _GrlNetWcPrivate {
static const char *capture_dir = NULL;
-#define GRL_NET_WC_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE((object), \
- GRL_TYPE_NET_WC, \
- GrlNetWcPrivate))
-
GQuark
grl_net_wc_error_quark (void)
{
return g_quark_from_static_string ("grl-wc-error-quark");
}
-G_DEFINE_TYPE (GrlNetWc, grl_net_wc, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (GrlNetWc, grl_net_wc, G_TYPE_OBJECT);
static void grl_net_wc_finalize (GObject *object);
static void grl_net_wc_set_property (GObject *object,
@@ -123,8 +118,6 @@ grl_net_wc_class_init (GrlNetWcClass *klass)
g_klass->set_property = grl_net_wc_set_property;
g_klass->get_property = grl_net_wc_get_property;
- g_type_class_add_private (klass, sizeof (GrlNetWcPrivate));
-
/**
* GrlNetWc::loglevel:
*
@@ -318,7 +311,7 @@ grl_net_wc_init (GrlNetWc *wc)
{
GRL_LOG_DOMAIN_INIT (wc_log_domain, "wc");
- wc->priv = GRL_NET_WC_GET_PRIVATE (wc);
+ wc->priv = grl_net_wc_get_instance_private (wc);
wc->priv->session = soup_session_async_new ();
wc->priv->pending = g_queue_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]