[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [sandbox PATCH 2/2] Remove all uses of g_type_class_add_private()



The API has been deprecated, which causes build failures
on Fedora Rawhide; use the G_DEFINE_TYPE_WITH_PRIVATE()
macro instead.

This requires bumping the minimum GLib version to 2.38.

Signed-off-by: Andrea Bolognani <abologna redhat com>
---
 configure.ac                                                 | 2 +-
 libvirt-sandbox/libvirt-sandbox-builder-container.c          | 4 +---
 libvirt-sandbox/libvirt-sandbox-builder-initrd.c             | 4 +---
 libvirt-sandbox/libvirt-sandbox-builder-machine.c            | 4 +---
 libvirt-sandbox/libvirt-sandbox-builder.c                    | 4 +---
 libvirt-sandbox/libvirt-sandbox-config-disk.c                | 4 +---
 libvirt-sandbox/libvirt-sandbox-config-initrd.c              | 4 +---
 libvirt-sandbox/libvirt-sandbox-config-interactive.c         | 4 +---
 libvirt-sandbox/libvirt-sandbox-config-mount-file.c          | 4 +---
 libvirt-sandbox/libvirt-sandbox-config-mount-guest-bind.c    | 5 ++---
 libvirt-sandbox/libvirt-sandbox-config-mount-host-bind.c     | 5 ++---
 libvirt-sandbox/libvirt-sandbox-config-mount-host-image.c    | 4 +---
 libvirt-sandbox/libvirt-sandbox-config-mount-ram.c           | 4 +---
 libvirt-sandbox/libvirt-sandbox-config-mount.c               | 4 +---
 libvirt-sandbox/libvirt-sandbox-config-network-address.c     | 4 +---
 .../libvirt-sandbox-config-network-filterref-parameter.c     | 4 +---
 libvirt-sandbox/libvirt-sandbox-config-network-filterref.c   | 4 +---
 libvirt-sandbox/libvirt-sandbox-config-network-route.c       | 4 +---
 libvirt-sandbox/libvirt-sandbox-config-network.c             | 4 +---
 libvirt-sandbox/libvirt-sandbox-config-service-generic.c     | 4 +---
 libvirt-sandbox/libvirt-sandbox-config-service-systemd.c     | 4 +---
 libvirt-sandbox/libvirt-sandbox-config-service.c             | 4 +---
 libvirt-sandbox/libvirt-sandbox-config.c                     | 4 +---
 libvirt-sandbox/libvirt-sandbox-console-raw.c                | 4 +---
 libvirt-sandbox/libvirt-sandbox-console-rpc.c                | 4 +---
 libvirt-sandbox/libvirt-sandbox-console.c                    | 4 +---
 libvirt-sandbox/libvirt-sandbox-context-interactive.c        | 4 +---
 libvirt-sandbox/libvirt-sandbox-context-service.c            | 4 +---
 libvirt-sandbox/libvirt-sandbox-context.c                    | 4 +---
 29 files changed, 31 insertions(+), 85 deletions(-)

diff --git a/configure.ac b/configure.ac
index d2e2636..42b6538 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,7 @@ AC_CANONICAL_HOST
 
 AM_SILENT_RULES([yes])
 
-GLIB_REQUIRED=2.32.0
+GLIB_REQUIRED=2.38.0
 LIBVIRT_REQUIRED=1.0.2
 LIBVIRT_GCONFIG_REQUIRED=0.2.1
 LIBVIRT_GLIB_REQUIRED=0.2.2
diff --git a/libvirt-sandbox/libvirt-sandbox-builder-container.c b/libvirt-sandbox/libvirt-sandbox-builder-container.c
index 66e1fc6..a4b00e3 100644
--- a/libvirt-sandbox/libvirt-sandbox-builder-container.c
+++ b/libvirt-sandbox/libvirt-sandbox-builder-container.c
@@ -48,7 +48,7 @@ struct _GVirSandboxBuilderContainerPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirSandboxBuilderContainer, gvir_sandbox_builder_container, GVIR_SANDBOX_TYPE_BUILDER);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxBuilderContainer, gvir_sandbox_builder_container, GVIR_SANDBOX_TYPE_BUILDER);
 
 
 enum {
@@ -473,8 +473,6 @@ static void gvir_sandbox_builder_container_class_init(GVirSandboxBuilderContaine
     builder_class->construct_devices = gvir_sandbox_builder_container_construct_devices;
     builder_class->get_disk_prefix = gvir_sandbox_builder_container_get_disk_prefix;
     builder_class->get_files_to_copy = gvir_sandbox_builder_container_get_files_to_copy;
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxBuilderContainerPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-builder-initrd.c b/libvirt-sandbox/libvirt-sandbox-builder-initrd.c
index 59a03e6..a550d4c 100644
--- a/libvirt-sandbox/libvirt-sandbox-builder-initrd.c
+++ b/libvirt-sandbox/libvirt-sandbox-builder-initrd.c
@@ -51,7 +51,7 @@ struct _GVirSandboxBuilderInitrdPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirSandboxBuilderInitrd, gvir_sandbox_builder_initrd, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxBuilderInitrd, gvir_sandbox_builder_initrd, G_TYPE_OBJECT);
 
 
 enum {
@@ -127,8 +127,6 @@ static void gvir_sandbox_builder_initrd_class_init(GVirSandboxBuilderInitrdClass
     object_class->finalize = gvir_sandbox_builder_initrd_finalize;
     object_class->get_property = gvir_sandbox_builder_initrd_get_property;
     object_class->set_property = gvir_sandbox_builder_initrd_set_property;
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxBuilderInitrdPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-builder-machine.c b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
index b6f2218..a4a5dcd 100644
--- a/libvirt-sandbox/libvirt-sandbox-builder-machine.c
+++ b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
@@ -50,7 +50,7 @@ struct _GVirSandboxBuilderMachinePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirSandboxBuilderMachine, gvir_sandbox_builder_machine, GVIR_SANDBOX_TYPE_BUILDER);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxBuilderMachine, gvir_sandbox_builder_machine, GVIR_SANDBOX_TYPE_BUILDER);
 
 
 enum {
@@ -792,8 +792,6 @@ static void gvir_sandbox_builder_machine_class_init(GVirSandboxBuilderMachineCla
     builder_class->clean_post_start = gvir_sandbox_builder_machine_clean_post_start;
     builder_class->clean_post_stop = gvir_sandbox_builder_machine_clean_post_stop;
     builder_class->get_disk_prefix = gvir_sandbox_builder_machine_get_disk_prefix;
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxBuilderMachinePrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-builder.c b/libvirt-sandbox/libvirt-sandbox-builder.c
index 0c43b62..8cfc2f4 100644
--- a/libvirt-sandbox/libvirt-sandbox-builder.c
+++ b/libvirt-sandbox/libvirt-sandbox-builder.c
@@ -47,7 +47,7 @@ struct _GVirSandboxBuilderPrivate
     GVirConnection *connection;
 };
 
-G_DEFINE_ABSTRACT_TYPE(GVirSandboxBuilder, gvir_sandbox_builder, G_TYPE_OBJECT);
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(GVirSandboxBuilder, gvir_sandbox_builder, G_TYPE_OBJECT);
 
 
 enum {
@@ -193,8 +193,6 @@ static void gvir_sandbox_builder_class_init(GVirSandboxBuilderClass *klass)
                                                         G_PARAM_STATIC_NAME |
                                                         G_PARAM_STATIC_NICK |
                                                         G_PARAM_STATIC_BLURB));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxBuilderPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-disk.c b/libvirt-sandbox/libvirt-sandbox-config-disk.c
index 9837735..3584b62 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-disk.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-disk.c
@@ -47,7 +47,7 @@ struct _GVirSandboxConfigDiskPrivate
     GVirConfigDomainDiskFormat format;
 };
 
-G_DEFINE_TYPE(GVirSandboxConfigDisk, gvir_sandbox_config_disk, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConfigDisk, gvir_sandbox_config_disk, G_TYPE_OBJECT);
 
 
 enum {
@@ -194,8 +194,6 @@ static void gvir_sandbox_config_disk_class_init(GVirSandboxConfigDiskClass *klas
                                                       G_PARAM_STATIC_NAME |
                                                       G_PARAM_STATIC_NICK |
                                                       G_PARAM_STATIC_BLURB));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigDiskPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-initrd.c b/libvirt-sandbox/libvirt-sandbox-config-initrd.c
index ed35c36..dcdc3de 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-initrd.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-initrd.c
@@ -48,7 +48,7 @@ struct _GVirSandboxConfigInitrdPrivate
     GList *modules;
 };
 
-G_DEFINE_TYPE(GVirSandboxConfigInitrd, gvir_sandbox_config_initrd, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConfigInitrd, gvir_sandbox_config_initrd, G_TYPE_OBJECT);
 
 
 enum {
@@ -174,8 +174,6 @@ static void gvir_sandbox_config_initrd_class_init(GVirSandboxConfigInitrdClass *
                                                         G_PARAM_STATIC_NAME |
                                                         G_PARAM_STATIC_NICK |
                                                         G_PARAM_STATIC_BLURB));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigInitrdPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-interactive.c b/libvirt-sandbox/libvirt-sandbox-config-interactive.c
index 88bc015..6d35c3a 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-interactive.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-interactive.c
@@ -47,7 +47,7 @@ struct _GVirSandboxConfigInteractivePrivate
     gchar **command;
 };
 
-G_DEFINE_TYPE(GVirSandboxConfigInteractive, gvir_sandbox_config_interactive, GVIR_SANDBOX_TYPE_CONFIG);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConfigInteractive, gvir_sandbox_config_interactive, GVIR_SANDBOX_TYPE_CONFIG);
 
 static gchar **gvir_sandbox_config_interactive_get_command(GVirSandboxConfig *config);
 
@@ -210,8 +210,6 @@ static void gvir_sandbox_config_interactive_class_init(GVirSandboxConfigInteract
                                                         G_PARAM_STATIC_NAME |
                                                         G_PARAM_STATIC_NICK |
                                                         G_PARAM_STATIC_BLURB));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigInteractivePrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-mount-file.c b/libvirt-sandbox/libvirt-sandbox-config-mount-file.c
index e53929f..9d15954 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-mount-file.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-mount-file.c
@@ -48,7 +48,7 @@ struct _GVirSandboxConfigMountFilePrivate
     gchar *source;
 };
 
-G_DEFINE_ABSTRACT_TYPE(GVirSandboxConfigMountFile, gvir_sandbox_config_mount_file, GVIR_SANDBOX_TYPE_CONFIG_MOUNT);
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(GVirSandboxConfigMountFile, gvir_sandbox_config_mount_file, GVIR_SANDBOX_TYPE_CONFIG_MOUNT);
 
 enum {
     PROP_0,
@@ -131,8 +131,6 @@ static void gvir_sandbox_config_mount_file_class_init(GVirSandboxConfigMountFile
                                                         G_PARAM_STATIC_NAME |
                                                         G_PARAM_STATIC_NICK |
                                                         G_PARAM_STATIC_BLURB));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigMountFilePrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-mount-guest-bind.c b/libvirt-sandbox/libvirt-sandbox-config-mount-guest-bind.c
index 061f625..1510458 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-mount-guest-bind.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-mount-guest-bind.c
@@ -48,12 +48,11 @@ struct _GVirSandboxConfigMountGuestBindPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirSandboxConfigMountGuestBind, gvir_sandbox_config_mount_guest_bind, GVIR_SANDBOX_TYPE_CONFIG_MOUNT_FILE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConfigMountGuestBind, gvir_sandbox_config_mount_guest_bind, GVIR_SANDBOX_TYPE_CONFIG_MOUNT_FILE);
 
 
-static void gvir_sandbox_config_mount_guest_bind_class_init(GVirSandboxConfigMountGuestBindClass *klass)
+static void gvir_sandbox_config_mount_guest_bind_class_init(GVirSandboxConfigMountGuestBindClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigMountGuestBindPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-mount-host-bind.c b/libvirt-sandbox/libvirt-sandbox-config-mount-host-bind.c
index c0c911b..cc27449 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-mount-host-bind.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-mount-host-bind.c
@@ -48,12 +48,11 @@ struct _GVirSandboxConfigMountHostBindPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirSandboxConfigMountHostBind, gvir_sandbox_config_mount_host_bind, GVIR_SANDBOX_TYPE_CONFIG_MOUNT_FILE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConfigMountHostBind, gvir_sandbox_config_mount_host_bind, GVIR_SANDBOX_TYPE_CONFIG_MOUNT_FILE);
 
 
-static void gvir_sandbox_config_mount_host_bind_class_init(GVirSandboxConfigMountHostBindClass *klass)
+static void gvir_sandbox_config_mount_host_bind_class_init(GVirSandboxConfigMountHostBindClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigMountHostBindPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-mount-host-image.c b/libvirt-sandbox/libvirt-sandbox-config-mount-host-image.c
index cf7ce49..2c82fab 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-mount-host-image.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-mount-host-image.c
@@ -48,7 +48,7 @@ struct _GVirSandboxConfigMountHostImagePrivate
     GVirConfigDomainDiskFormat format;
 };
 
-G_DEFINE_TYPE(GVirSandboxConfigMountHostImage, gvir_sandbox_config_mount_host_image, GVIR_SANDBOX_TYPE_CONFIG_MOUNT_FILE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConfigMountHostImage, gvir_sandbox_config_mount_host_image, GVIR_SANDBOX_TYPE_CONFIG_MOUNT_FILE);
 
 enum {
     PROP_0,
@@ -118,8 +118,6 @@ static void gvir_sandbox_config_mount_host_image_class_init(GVirSandboxConfigMou
                                                       G_PARAM_STATIC_NAME |
                                                       G_PARAM_STATIC_NICK |
                                                       G_PARAM_STATIC_BLURB));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigMountHostImagePrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-mount-ram.c b/libvirt-sandbox/libvirt-sandbox-config-mount-ram.c
index 1e0c352..82eef8b 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-mount-ram.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-mount-ram.c
@@ -48,7 +48,7 @@ struct _GVirSandboxConfigMountRamPrivate
     guint64 usage;
 };
 
-G_DEFINE_TYPE(GVirSandboxConfigMountRam, gvir_sandbox_config_mount_ram, GVIR_SANDBOX_TYPE_CONFIG_MOUNT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConfigMountRam, gvir_sandbox_config_mount_ram, GVIR_SANDBOX_TYPE_CONFIG_MOUNT);
 
 enum {
     PROP_0,
@@ -121,8 +121,6 @@ static void gvir_sandbox_config_mount_ram_class_init(GVirSandboxConfigMountRamCl
                                                         G_PARAM_STATIC_NAME |
                                                         G_PARAM_STATIC_NICK |
                                                         G_PARAM_STATIC_BLURB));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigMountRamPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-mount.c b/libvirt-sandbox/libvirt-sandbox-config-mount.c
index 21a8684..bb26cd6 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-mount.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-mount.c
@@ -49,7 +49,7 @@ struct _GVirSandboxConfigMountPrivate
     GHashTable *includes;
 };
 
-G_DEFINE_ABSTRACT_TYPE(GVirSandboxConfigMount, gvir_sandbox_config_mount, G_TYPE_OBJECT);
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(GVirSandboxConfigMount, gvir_sandbox_config_mount, G_TYPE_OBJECT);
 
 
 enum {
@@ -134,8 +134,6 @@ static void gvir_sandbox_config_mount_class_init(GVirSandboxConfigMountClass *kl
                                                         G_PARAM_STATIC_NAME |
                                                         G_PARAM_STATIC_NICK |
                                                         G_PARAM_STATIC_BLURB));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigMountPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-network-address.c b/libvirt-sandbox/libvirt-sandbox-config-network-address.c
index 68b0268..e885fa2 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-network-address.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-network-address.c
@@ -47,7 +47,7 @@ struct _GVirSandboxConfigNetworkAddressPrivate
     guint prefix;
 };
 
-G_DEFINE_TYPE(GVirSandboxConfigNetworkAddress, gvir_sandbox_config_network_address, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConfigNetworkAddress, gvir_sandbox_config_network_address, G_TYPE_OBJECT);
 
 
 enum {
@@ -180,8 +180,6 @@ static void gvir_sandbox_config_network_address_class_init(GVirSandboxConfigNetw
                                                       G_PARAM_STATIC_NAME |
                                                       G_PARAM_STATIC_NICK |
                                                       G_PARAM_STATIC_BLURB));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigNetworkAddressPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-network-filterref-parameter.c b/libvirt-sandbox/libvirt-sandbox-config-network-filterref-parameter.c
index 2807b4f..063efac 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-network-filterref-parameter.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-network-filterref-parameter.c
@@ -45,7 +45,7 @@ struct _GVirSandboxConfigNetworkFilterrefParameterPrivate
     gchar *value;
 };
 
-G_DEFINE_TYPE(GVirSandboxConfigNetworkFilterrefParameter, gvir_sandbox_config_network_filterref_parameter, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConfigNetworkFilterrefParameter, gvir_sandbox_config_network_filterref_parameter, G_TYPE_OBJECT);
 
 
 enum {
@@ -143,8 +143,6 @@ static void gvir_sandbox_config_network_filterref_parameter_class_init(GVirSandb
                                                         NULL,
                                                         G_PARAM_READWRITE |
                                                         G_PARAM_STATIC_STRINGS));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigNetworkFilterrefParameterPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-network-filterref.c b/libvirt-sandbox/libvirt-sandbox-config-network-filterref.c
index 1770c0b..755aec6 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-network-filterref.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-network-filterref.c
@@ -47,7 +47,7 @@ struct _GVirSandboxConfigNetworkFilterrefPrivate
     GList *parameters;
 };
 
-G_DEFINE_TYPE(GVirSandboxConfigNetworkFilterref, gvir_sandbox_config_network_filterref, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConfigNetworkFilterref, gvir_sandbox_config_network_filterref, G_TYPE_OBJECT);
 
 
 enum {
@@ -128,8 +128,6 @@ static void gvir_sandbox_config_network_filterref_class_init(GVirSandboxConfigNe
                                                         NULL,
                                                         G_PARAM_READWRITE |
                                                         G_PARAM_STATIC_STRINGS));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigNetworkFilterrefPrivate));
 }
 
 /**
diff --git a/libvirt-sandbox/libvirt-sandbox-config-network-route.c b/libvirt-sandbox/libvirt-sandbox-config-network-route.c
index c6bf6f3..621a767 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-network-route.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-network-route.c
@@ -47,7 +47,7 @@ struct _GVirSandboxConfigNetworkRoutePrivate
     GInetAddress *target;
 };
 
-G_DEFINE_TYPE(GVirSandboxConfigNetworkRoute, gvir_sandbox_config_network_route, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConfigNetworkRoute, gvir_sandbox_config_network_route, G_TYPE_OBJECT);
 
 
 enum {
@@ -180,8 +180,6 @@ static void gvir_sandbox_config_network_route_class_init(GVirSandboxConfigNetwor
                                                         G_PARAM_STATIC_NAME |
                                                         G_PARAM_STATIC_NICK |
                                                         G_PARAM_STATIC_BLURB));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigNetworkRoutePrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-network.c b/libvirt-sandbox/libvirt-sandbox-config-network.c
index df21700..9e2bbdf 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-network.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-network.c
@@ -50,7 +50,7 @@ struct _GVirSandboxConfigNetworkPrivate
     GVirSandboxConfigNetworkFilterref *filterref;
 };
 
-G_DEFINE_TYPE(GVirSandboxConfigNetwork, gvir_sandbox_config_network, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConfigNetwork, gvir_sandbox_config_network, G_TYPE_OBJECT);
 
 
 enum {
@@ -183,8 +183,6 @@ static void gvir_sandbox_config_network_class_init(GVirSandboxConfigNetworkClass
                                                         G_PARAM_STATIC_NAME |
                                                         G_PARAM_STATIC_NICK |
                                                         G_PARAM_STATIC_BLURB));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigNetworkPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-service-generic.c b/libvirt-sandbox/libvirt-sandbox-config-service-generic.c
index d1118c2..6d15fb8 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-service-generic.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-service-generic.c
@@ -45,7 +45,7 @@ struct _GVirSandboxConfigServiceGenericPrivate
     gchar **command;
 };
 
-G_DEFINE_TYPE(GVirSandboxConfigServiceGeneric, gvir_sandbox_config_service_generic, GVIR_SANDBOX_TYPE_CONFIG_SERVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConfigServiceGeneric, gvir_sandbox_config_service_generic, GVIR_SANDBOX_TYPE_CONFIG_SERVICE);
 
 static gchar **gvir_sandbox_config_service_generic_get_command(GVirSandboxConfig *config);
 
@@ -154,8 +154,6 @@ static void gvir_sandbox_config_service_generic_class_init(GVirSandboxConfigServ
     config_class->load_config = gvir_sandbox_config_service_generic_load_config;
     config_class->save_config = gvir_sandbox_config_service_generic_save_config;
     config_class->get_command = gvir_sandbox_config_service_generic_get_command;
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigServiceGenericPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-service-systemd.c b/libvirt-sandbox/libvirt-sandbox-config-service-systemd.c
index dc2e4a5..7f7ea7e 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-service-systemd.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-service-systemd.c
@@ -45,7 +45,7 @@ struct _GVirSandboxConfigServiceSystemdPrivate
     gchar *bootTarget;
 };
 
-G_DEFINE_TYPE(GVirSandboxConfigServiceSystemd, gvir_sandbox_config_service_systemd, GVIR_SANDBOX_TYPE_CONFIG_SERVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConfigServiceSystemd, gvir_sandbox_config_service_systemd, GVIR_SANDBOX_TYPE_CONFIG_SERVICE);
 
 static gchar **gvir_sandbox_config_service_systemd_get_command(GVirSandboxConfig *config);
 
@@ -165,8 +165,6 @@ static void gvir_sandbox_config_service_systemd_class_init(GVirSandboxConfigServ
     config_class->load_config = gvir_sandbox_config_service_systemd_load_config;
     config_class->save_config = gvir_sandbox_config_service_systemd_save_config;
     config_class->get_command = gvir_sandbox_config_service_systemd_get_command;
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigServiceSystemdPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config-service.c b/libvirt-sandbox/libvirt-sandbox-config-service.c
index 388ec63..668db4a 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-service.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-service.c
@@ -45,7 +45,7 @@ struct _GVirSandboxConfigServicePrivate
     gboolean unused;
 };
 
-G_DEFINE_ABSTRACT_TYPE(GVirSandboxConfigService, gvir_sandbox_config_service, GVIR_SANDBOX_TYPE_CONFIG);
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(GVirSandboxConfigService, gvir_sandbox_config_service, GVIR_SANDBOX_TYPE_CONFIG);
 
 
 enum {
@@ -77,8 +77,6 @@ static void gvir_sandbox_config_service_class_init(GVirSandboxConfigServiceClass
     GObjectClass *object_class = G_OBJECT_CLASS(klass);
 
     object_class->finalize = gvir_sandbox_config_service_finalize;
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigServicePrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-config.c b/libvirt-sandbox/libvirt-sandbox-config.c
index 73a0fa4..ded1093 100644
--- a/libvirt-sandbox/libvirt-sandbox-config.c
+++ b/libvirt-sandbox/libvirt-sandbox-config.c
@@ -73,7 +73,7 @@ struct _GVirSandboxConfigPrivate
     gboolean verbose;
 };
 
-G_DEFINE_ABSTRACT_TYPE(GVirSandboxConfig, gvir_sandbox_config, G_TYPE_OBJECT);
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(GVirSandboxConfig, gvir_sandbox_config, G_TYPE_OBJECT);
 
 
 enum {
@@ -470,8 +470,6 @@ static void gvir_sandbox_config_class_init(GVirSandboxConfigClass *klass)
                                                          G_PARAM_STATIC_NAME |
                                                          G_PARAM_STATIC_NICK |
                                                          G_PARAM_STATIC_BLURB));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConfigPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-console-raw.c b/libvirt-sandbox/libvirt-sandbox-console-raw.c
index a10d8f7..7ed61cb 100644
--- a/libvirt-sandbox/libvirt-sandbox-console-raw.c
+++ b/libvirt-sandbox/libvirt-sandbox-console-raw.c
@@ -94,7 +94,7 @@ struct _GVirSandboxConsoleRawPrivate
     GSource *consoleOutputSource;
 };
 
-G_DEFINE_TYPE(GVirSandboxConsoleRaw, gvir_sandbox_console_raw, GVIR_SANDBOX_TYPE_CONSOLE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConsoleRaw, gvir_sandbox_console_raw, GVIR_SANDBOX_TYPE_CONSOLE);
 
 enum {
     LAST_SIGNAL
@@ -133,8 +133,6 @@ static void gvir_sandbox_console_raw_class_init(GVirSandboxConsoleRawClass *klas
     object_class->finalize = gvir_sandbox_console_raw_finalize;
     console_class->attach = gvir_sandbox_console_raw_attach;
     console_class->detach = gvir_sandbox_console_raw_detach;
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConsoleRawPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-console-rpc.c b/libvirt-sandbox/libvirt-sandbox-console-rpc.c
index be35bb5..abc9390 100644
--- a/libvirt-sandbox/libvirt-sandbox-console-rpc.c
+++ b/libvirt-sandbox/libvirt-sandbox-console-rpc.c
@@ -153,7 +153,7 @@ struct _GVirSandboxConsoleRpcPrivate
     gsize serial;
 };
 
-G_DEFINE_TYPE(GVirSandboxConsoleRpc, gvir_sandbox_console_rpc, GVIR_SANDBOX_TYPE_CONSOLE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxConsoleRpc, gvir_sandbox_console_rpc, GVIR_SANDBOX_TYPE_CONSOLE);
 
 
 enum {
@@ -291,8 +291,6 @@ static void gvir_sandbox_console_rpc_class_init(GVirSandboxConsoleRpcClass *klas
                  G_TYPE_NONE,
                  1,
                  G_TYPE_INT);
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConsoleRpcPrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-console.c b/libvirt-sandbox/libvirt-sandbox-console.c
index 9fcfcdd..881285c 100644
--- a/libvirt-sandbox/libvirt-sandbox-console.c
+++ b/libvirt-sandbox/libvirt-sandbox-console.c
@@ -54,7 +54,7 @@ struct _GVirSandboxConsolePrivate
 };
 
 
-G_DEFINE_ABSTRACT_TYPE(GVirSandboxConsole, gvir_sandbox_console, G_TYPE_OBJECT);
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(GVirSandboxConsole, gvir_sandbox_console, G_TYPE_OBJECT);
 
 enum {
     PROP_0,
@@ -251,8 +251,6 @@ static void gvir_sandbox_console_class_init(GVirSandboxConsoleClass *klass)
                  G_TYPE_NONE,
                  1,
                  G_TYPE_BOOLEAN);
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxConsolePrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-context-interactive.c b/libvirt-sandbox/libvirt-sandbox-context-interactive.c
index 5ecaf09..d988323 100644
--- a/libvirt-sandbox/libvirt-sandbox-context-interactive.c
+++ b/libvirt-sandbox/libvirt-sandbox-context-interactive.c
@@ -49,7 +49,7 @@ struct _GVirSandboxContextInteractivePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirSandboxContextInteractive, gvir_sandbox_context_interactive, GVIR_SANDBOX_TYPE_CONTEXT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxContextInteractive, gvir_sandbox_context_interactive, GVIR_SANDBOX_TYPE_CONTEXT);
 
 
 enum {
@@ -346,8 +346,6 @@ static void gvir_sandbox_context_interactive_class_init(GVirSandboxContextIntera
 
     context_class->start = gvir_sandbox_context_interactive_start;
     context_class->stop = gvir_sandbox_context_interactive_stop;
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxContextInteractivePrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-context-service.c b/libvirt-sandbox/libvirt-sandbox-context-service.c
index 538a740..6b4622e 100644
--- a/libvirt-sandbox/libvirt-sandbox-context-service.c
+++ b/libvirt-sandbox/libvirt-sandbox-context-service.c
@@ -47,7 +47,7 @@ struct _GVirSandboxContextServicePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirSandboxContextService, gvir_sandbox_context_service, GVIR_SANDBOX_TYPE_CONTEXT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxContextService, gvir_sandbox_context_service, GVIR_SANDBOX_TYPE_CONTEXT);
 
 
 enum {
@@ -356,8 +356,6 @@ static void gvir_sandbox_context_service_class_init(GVirSandboxContextServiceCla
 
     klass->define = gvir_sandbox_context_service_define_default;
     klass->undefine = gvir_sandbox_context_service_undefine_default;
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxContextServicePrivate));
 }
 
 
diff --git a/libvirt-sandbox/libvirt-sandbox-context.c b/libvirt-sandbox/libvirt-sandbox-context.c
index 28a70b5..e271f6b 100644
--- a/libvirt-sandbox/libvirt-sandbox-context.c
+++ b/libvirt-sandbox/libvirt-sandbox-context.c
@@ -52,7 +52,7 @@ struct _GVirSandboxContextPrivate
     GVirSandboxConfig *config;
 };
 
-G_DEFINE_ABSTRACT_TYPE(GVirSandboxContext, gvir_sandbox_context, G_TYPE_OBJECT);
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(GVirSandboxContext, gvir_sandbox_context, G_TYPE_OBJECT);
 
 
 enum {
@@ -208,8 +208,6 @@ static void gvir_sandbox_context_class_init(GVirSandboxContextClass *klass)
                                                         G_PARAM_STATIC_NAME |
                                                         G_PARAM_STATIC_NICK |
                                                         G_PARAM_STATIC_BLURB));
-
-    g_type_class_add_private(klass, sizeof(GVirSandboxContextPrivate));
 }
 
 
-- 
2.17.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]