summaryrefslogtreecommitdiff
path: root/libgupnp-igd/gupnp-simple-igd-thread.c
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2020-03-18 20:27:09 -0400
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>2020-03-19 19:38:51 +0000
commitd84e0d0ed2141f0a4e0cdb9f1076fc0571b85b12 (patch)
tree467bd4f6d9bb3869715f18abe94d683c02a0c49a /libgupnp-igd/gupnp-simple-igd-thread.c
parent80018c33157cb7d6f9ade4e4927fb6904f274658 (diff)
downloadgupnp-igd-d84e0d0ed2141f0a4e0cdb9f1076fc0571b85b12.tar.gz
Move to new style private data
Also now require GLib 2.38
Diffstat (limited to 'libgupnp-igd/gupnp-simple-igd-thread.c')
-rw-r--r--libgupnp-igd/gupnp-simple-igd-thread.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libgupnp-igd/gupnp-simple-igd-thread.c b/libgupnp-igd/gupnp-simple-igd-thread.c
index 3c025ac..77bfebd 100644
--- a/libgupnp-igd/gupnp-simple-igd-thread.c
+++ b/libgupnp-igd/gupnp-simple-igd-thread.c
@@ -88,8 +88,8 @@ struct _GUPnPSimpleIgdThreadPrivate
g_mutex_unlock (&(o)->priv->thread_data->mutex)
-G_DEFINE_TYPE (GUPnPSimpleIgdThread, gupnp_simple_igd_thread,
- GUPNP_TYPE_SIMPLE_IGD);
+G_DEFINE_TYPE_WITH_CODE (GUPnPSimpleIgdThread, gupnp_simple_igd_thread,
+ GUPNP_TYPE_SIMPLE_IGD, G_ADD_PRIVATE (GUPnPSimpleIgdThread));
static void gupnp_simple_igd_thread_constructed (GObject *object);
static GObject *gupnp_simple_igd_thread_constructor (GType type,
@@ -132,8 +132,6 @@ gupnp_simple_igd_thread_class_init (GUPnPSimpleIgdThreadClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GUPnPSimpleIgdClass *simple_igd_class = GUPNP_SIMPLE_IGD_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GUPnPSimpleIgdThreadPrivate));
-
gobject_class->constructed = gupnp_simple_igd_thread_constructed;
gobject_class->constructor = gupnp_simple_igd_thread_constructor;
gobject_class->dispose = gupnp_simple_igd_thread_dispose;
@@ -149,7 +147,7 @@ gupnp_simple_igd_thread_class_init (GUPnPSimpleIgdThreadClass *klass)
static void
gupnp_simple_igd_thread_init (GUPnPSimpleIgdThread *self)
{
- self->priv = GUPNP_SIMPLE_IGD_THREAD_GET_PRIVATE (self);
+ self->priv = gupnp_simple_igd_thread_get_instance_private (self);
self->priv->context = g_main_context_new ();
g_cond_init (&self->priv->can_dispose_cond);