gio: Use the new private instance data declaration

Use the newly added macros, and remove the explicit calls to
g_type_class_add_private().

https://bugzilla.gnome.org/show_bug.cgi?id=700035
This commit is contained in:
Emmanuele Bassi
2013-06-11 00:29:58 +01:00
parent aba80eea6c
commit 32747def4b
76 changed files with 387 additions and 730 deletions

View File

@@ -103,7 +103,7 @@ struct _GTlsInteractionPrivate {
GMainContext *context;
};
G_DEFINE_TYPE (GTlsInteraction, g_tls_interaction, G_TYPE_OBJECT);
G_DEFINE_TYPE_WITH_PRIVATE (GTlsInteraction, g_tls_interaction, G_TYPE_OBJECT)
typedef struct {
GMutex mutex;
@@ -185,8 +185,7 @@ invoke_closure_wait_and_free (InvokeClosure *closure,
static void
g_tls_interaction_init (GTlsInteraction *interaction)
{
interaction->priv = G_TYPE_INSTANCE_GET_PRIVATE (interaction, G_TYPE_TLS_INTERACTION,
GTlsInteractionPrivate);
interaction->priv = g_tls_interaction_get_private (interaction);
interaction->priv->context = g_main_context_ref_thread_default ();
}
@@ -206,8 +205,6 @@ g_tls_interaction_class_init (GTlsInteractionClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = g_tls_interaction_finalize;
g_type_class_add_private (klass, sizeof (GTlsInteractionPrivate));
}
static gboolean