mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-05 08:53:39 +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:
@@ -788,14 +788,14 @@ enum {
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
guint signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
G_DEFINE_TYPE (GAppLaunchContext, g_app_launch_context, G_TYPE_OBJECT);
|
||||
|
||||
struct _GAppLaunchContextPrivate {
|
||||
char **envp;
|
||||
};
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GAppLaunchContext, g_app_launch_context, G_TYPE_OBJECT)
|
||||
|
||||
/**
|
||||
* g_app_launch_context_new:
|
||||
*
|
||||
@@ -825,8 +825,6 @@ g_app_launch_context_class_init (GAppLaunchContextClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GAppLaunchContextPrivate));
|
||||
|
||||
object_class->finalize = g_app_launch_context_finalize;
|
||||
|
||||
/*
|
||||
@@ -873,7 +871,7 @@ g_app_launch_context_class_init (GAppLaunchContextClass *klass)
|
||||
static void
|
||||
g_app_launch_context_init (GAppLaunchContext *context)
|
||||
{
|
||||
context->priv = G_TYPE_INSTANCE_GET_PRIVATE (context, G_TYPE_APP_LAUNCH_CONTEXT, GAppLaunchContextPrivate);
|
||||
context->priv = g_app_launch_context_get_private (context);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user