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

@@ -42,22 +42,18 @@
#include "gnetworking.h"
#include "gioerror.h"
G_DEFINE_TYPE (GUnixFDList, g_unix_fd_list, G_TYPE_OBJECT)
struct _GUnixFDListPrivate
{
gint *fds;
gint nfd;
};
G_DEFINE_TYPE_WITH_PRIVATE (GUnixFDList, g_unix_fd_list, G_TYPE_OBJECT)
static void
g_unix_fd_list_init (GUnixFDList *list)
{
list->priv = G_TYPE_INSTANCE_GET_PRIVATE (list,
G_TYPE_UNIX_FD_LIST,
GUnixFDListPrivate);
list->priv = g_unix_fd_list_get_private (list);
}
static void
@@ -79,7 +75,6 @@ g_unix_fd_list_class_init (GUnixFDListClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
g_type_class_add_private (class, sizeof (GUnixFDListPrivate));
object_class->finalize = g_unix_fd_list_finalize;
}