mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +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:
@@ -39,8 +39,6 @@
|
||||
#include "gwin32inputstream.h"
|
||||
#endif
|
||||
|
||||
G_DEFINE_TYPE (GApplicationCommandLine, g_application_command_line, G_TYPE_OBJECT)
|
||||
|
||||
/**
|
||||
* SECTION:gapplicationcommandline
|
||||
* @title: GApplicationCommandLine
|
||||
@@ -156,6 +154,8 @@ struct _GApplicationCommandLinePrivate
|
||||
gint exit_status;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GApplicationCommandLine, g_application_command_line, G_TYPE_OBJECT)
|
||||
|
||||
/* All subclasses represent remote invocations of some kind. */
|
||||
#define IS_REMOTE(cmdline) (G_TYPE_FROM_INSTANCE (cmdline) != \
|
||||
G_TYPE_APPLICATION_COMMAND_LINE)
|
||||
@@ -282,10 +282,7 @@ g_application_command_line_finalize (GObject *object)
|
||||
static void
|
||||
g_application_command_line_init (GApplicationCommandLine *cmdline)
|
||||
{
|
||||
cmdline->priv =
|
||||
G_TYPE_INSTANCE_GET_PRIVATE (cmdline,
|
||||
G_TYPE_APPLICATION_COMMAND_LINE,
|
||||
GApplicationCommandLinePrivate);
|
||||
cmdline->priv = g_application_command_line_get_private (cmdline);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -340,8 +337,6 @@ g_application_command_line_class_init (GApplicationCommandLineClass *class)
|
||||
P_("TRUE if this is a remote commandline"),
|
||||
FALSE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
g_type_class_add_private (class, sizeof (GApplicationCommandLinePrivate));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user