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

@@ -55,7 +55,7 @@ struct _GCancellablePrivate
static guint signals[LAST_SIGNAL] = { 0 };
G_DEFINE_TYPE (GCancellable, g_cancellable, G_TYPE_OBJECT);
G_DEFINE_TYPE_WITH_PRIVATE (GCancellable, g_cancellable, G_TYPE_OBJECT)
static GPrivate current_cancellable;
static GMutex cancellable_mutex;
@@ -77,8 +77,6 @@ g_cancellable_class_init (GCancellableClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GCancellablePrivate));
gobject_class->finalize = g_cancellable_finalize;
/**
@@ -153,9 +151,7 @@ g_cancellable_class_init (GCancellableClass *klass)
static void
g_cancellable_init (GCancellable *cancellable)
{
cancellable->priv = G_TYPE_INSTANCE_GET_PRIVATE (cancellable,
G_TYPE_CANCELLABLE,
GCancellablePrivate);
cancellable->priv = g_cancellable_get_private (cancellable);
}
/**