mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-04 16:33:40 +02:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user