[libvirt-glib][PATCH v2] Use new GObject define macros with private

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

 



G_ADD_PRIVATE was added in 2.38 and older functions are getting deprecated:
https://gitlab.gnome.org/GNOME/glib/merge_requests/7/commits

This also means, that the minimal required glib version is
increased to 2.38.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---

diff to v1:
- increased minimal glib version in configure.ac

 configure.ac                                                       | 2 +-
 libvirt-gconfig/libvirt-gconfig-capabilities-cpu-feature.c         | 5 ++---
 libvirt-gconfig/libvirt-gconfig-capabilities-cpu-model.c           | 5 ++---
 libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c        | 5 ++---
 libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c                 | 3 +--
 libvirt-gconfig/libvirt-gconfig-capabilities-guest-arch.c          | 5 ++---
 libvirt-gconfig/libvirt-gconfig-capabilities-guest-domain.c        | 5 ++---
 libvirt-gconfig/libvirt-gconfig-capabilities-guest-feature.c       | 5 ++---
 libvirt-gconfig/libvirt-gconfig-capabilities-guest.c               | 5 ++---
 libvirt-gconfig/libvirt-gconfig-capabilities-host-secmodel.c       | 5 ++---
 libvirt-gconfig/libvirt-gconfig-capabilities-host.c                | 5 ++---
 libvirt-gconfig/libvirt-gconfig-capabilities.c                     | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-address-pci.c               | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-address-usb.c               | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-address.c                   | 3 +--
 libvirt-gconfig/libvirt-gconfig-domain-channel.c                   | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.c        | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c  | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spicevmc.c   | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-chardev-source-unix.c       | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-chardev-source.c            | 3 +--
 libvirt-gconfig/libvirt-gconfig-domain-chardev.c                   | 3 +--
 libvirt-gconfig/libvirt-gconfig-domain-clock.c                     | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-console.c                   | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-controller-usb.c            | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-controller.c                | 3 +--
 libvirt-gconfig/libvirt-gconfig-domain-cpu-feature.c               | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-cpu-model.c                 | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-cpu.c                       | 3 +--
 libvirt-gconfig/libvirt-gconfig-domain-device.c                    | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-disk-driver.c               | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-disk.c                      | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-filesys.c                   | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.c          | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c              | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c              | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c            | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c              | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-graphics.c                  | 3 +--
 libvirt-gconfig/libvirt-gconfig-domain-hostdev-pci.c               | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-hostdev.c                   | 3 +--
 libvirt-gconfig/libvirt-gconfig-domain-input.c                     | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-interface-bridge.c          | 5 ++---
 .../libvirt-gconfig-domain-interface-filterref-parameter.c         | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-interface-filterref.c       | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-interface-network.c         | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-interface-user.c            | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-interface.c                 | 3 +--
 libvirt-gconfig/libvirt-gconfig-domain-memballoon.c                | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-os.c                        | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-parallel.c                  | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-power-management.c          | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-redirdev.c                  | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-seclabel.c                  | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-serial.c                    | 5 ++---
 .../libvirt-gconfig-domain-smartcard-host-certificates.c           | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-smartcard-host.c            | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-smartcard-passthrough.c     | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-smartcard.c                 | 3 +--
 libvirt-gconfig/libvirt-gconfig-domain-snapshot-disk.c             | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-snapshot.c                  | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-sound.c                     | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-timer-hpet.c                | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-timer-pit.c                 | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-timer-rtc.c                 | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain-timer.c                     | 3 +--
 libvirt-gconfig/libvirt-gconfig-domain-video.c                     | 5 ++---
 libvirt-gconfig/libvirt-gconfig-domain.c                           | 3 +--
 libvirt-gconfig/libvirt-gconfig-interface.c                        | 5 ++---
 libvirt-gconfig/libvirt-gconfig-network-filter.c                   | 5 ++---
 libvirt-gconfig/libvirt-gconfig-network.c                          | 5 ++---
 libvirt-gconfig/libvirt-gconfig-node-device.c                      | 5 ++---
 libvirt-gconfig/libvirt-gconfig-object.c                           | 4 +---
 libvirt-gconfig/libvirt-gconfig-secret.c                           | 5 ++---
 libvirt-gconfig/libvirt-gconfig-storage-permissions.c              | 5 ++---
 libvirt-gconfig/libvirt-gconfig-storage-pool-source.c              | 5 ++---
 libvirt-gconfig/libvirt-gconfig-storage-pool-target.c              | 5 ++---
 libvirt-gconfig/libvirt-gconfig-storage-pool.c                     | 5 ++---
 libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c        | 5 ++---
 libvirt-gconfig/libvirt-gconfig-storage-vol-target.c               | 5 ++---
 libvirt-gconfig/libvirt-gconfig-storage-vol.c                      | 5 ++---
 libvirt-gconfig/libvirt-gconfig-xml-doc.c                          | 3 +--
 libvirt-gobject/libvirt-gobject-connection.c                       | 3 +--
 libvirt-gobject/libvirt-gobject-domain-device.c                    | 1 -
 libvirt-gobject/libvirt-gobject-domain-disk.c                      | 5 ++---
 libvirt-gobject/libvirt-gobject-domain-interface.c                 | 5 ++---
 libvirt-gobject/libvirt-gobject-domain-snapshot.c                  | 3 +--
 libvirt-gobject/libvirt-gobject-domain.c                           | 3 +--
 libvirt-gobject/libvirt-gobject-input-stream.c                     | 7 +++----
 libvirt-gobject/libvirt-gobject-interface.c                        | 3 +--
 libvirt-gobject/libvirt-gobject-manager.c                          | 3 +--
 libvirt-gobject/libvirt-gobject-network-dhcp-lease.c               | 3 +--
 libvirt-gobject/libvirt-gobject-network-filter.c                   | 3 +--
 libvirt-gobject/libvirt-gobject-network.c                          | 3 +--
 libvirt-gobject/libvirt-gobject-node-device.c                      | 3 +--
 libvirt-gobject/libvirt-gobject-output-stream.c                    | 7 +++----
 libvirt-gobject/libvirt-gobject-secret.c                           | 3 +--
 libvirt-gobject/libvirt-gobject-storage-pool.c                     | 3 +--
 libvirt-gobject/libvirt-gobject-storage-vol.c                      | 3 +--
 libvirt-gobject/libvirt-gobject-stream.c                           | 3 +--
 100 files changed, 172 insertions(+), 272 deletions(-)

diff --git a/configure.ac b/configure.ac
index 05b9628..dd1a85a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ AM_SILENT_RULES([yes])
 
 LIBVIRT_REQUIRED=1.2.5
 AC_SUBST([LIBVIRT_REQUIRED]) dnl used in the .spec file
-GLIB2_REQUIRED=2.36.0
+GLIB2_REQUIRED=2.38.0
 AC_SUBST([GLIB2_REQUIRED]) dnl used in the .spec file
 GLIB2_TEST_REQUIRED=2.38.0
 GOBJECT_INTROSPECTION_REQUIRED=1.36.0
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-feature.c b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-feature.c
index b52c0bf..3b0a47d 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-feature.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-feature.c
@@ -35,11 +35,10 @@ struct _GVirConfigCapabilitiesCpuFeaturePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigCapabilitiesCpuFeature, gvir_config_capabilities_cpu_feature, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesCpuFeature, gvir_config_capabilities_cpu_feature, GVIR_CONFIG_TYPE_OBJECT);
 
-static void gvir_config_capabilities_cpu_feature_class_init(GVirConfigCapabilitiesCpuFeatureClass *klass)
+static void gvir_config_capabilities_cpu_feature_class_init(GVirConfigCapabilitiesCpuFeatureClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesCpuFeaturePrivate));
 }
 
 static void gvir_config_capabilities_cpu_feature_init(GVirConfigCapabilitiesCpuFeature *feature)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-model.c b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-model.c
index 14630a0..21b6c18 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-model.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-model.c
@@ -33,11 +33,10 @@ struct _GVirConfigCapabilitiesCpuModelPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigCapabilitiesCpuModel, gvir_config_capabilities_cpu_model, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesCpuModel, gvir_config_capabilities_cpu_model, GVIR_CONFIG_TYPE_OBJECT);
 
-static void gvir_config_capabilities_cpu_model_class_init(GVirConfigCapabilitiesCpuModelClass *klass)
+static void gvir_config_capabilities_cpu_model_class_init(GVirConfigCapabilitiesCpuModelClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesCpuModelPrivate));
 }
 
 static void gvir_config_capabilities_cpu_model_init(GVirConfigCapabilitiesCpuModel *model)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c
index 1ff879a..f4edc5c 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c
@@ -35,11 +35,10 @@ struct _GVirConfigCapabilitiesCpuTopologyPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigCapabilitiesCpuTopology, gvir_config_capabilities_cpu_topology, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesCpuTopology, gvir_config_capabilities_cpu_topology, GVIR_CONFIG_TYPE_OBJECT);
 
-static void gvir_config_capabilities_cpu_topology_class_init(GVirConfigCapabilitiesCpuTopologyClass *klass)
+static void gvir_config_capabilities_cpu_topology_class_init(GVirConfigCapabilitiesCpuTopologyClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesCpuTopologyPrivate));
 }
 
 static void gvir_config_capabilities_cpu_topology_init(GVirConfigCapabilitiesCpuTopology *topology)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c
index 913c759..1056bbd 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c
@@ -35,14 +35,13 @@ struct _GVirConfigCapabilitiesCpuPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigCapabilitiesCpu, gvir_config_capabilities_cpu, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesCpu, gvir_config_capabilities_cpu, GVIR_CONFIG_TYPE_OBJECT);
 
 static GList *
 _gvir_config_capabilities_cpu_get_features(GVirConfigCapabilitiesCpu *cpu);
 
 static void gvir_config_capabilities_cpu_class_init(GVirConfigCapabilitiesCpuClass *klass)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesCpuPrivate));
 
     klass->get_features = _gvir_config_capabilities_cpu_get_features;
 }
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-guest-arch.c b/libvirt-gconfig/libvirt-gconfig-capabilities-guest-arch.c
index 8da33dc..70c2885 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-guest-arch.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-guest-arch.c
@@ -35,11 +35,10 @@ struct _GVirConfigCapabilitiesGuestArchPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigCapabilitiesGuestArch, gvir_config_capabilities_guest_arch, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesGuestArch, gvir_config_capabilities_guest_arch, GVIR_CONFIG_TYPE_OBJECT);
 
-static void gvir_config_capabilities_guest_arch_class_init(GVirConfigCapabilitiesGuestArchClass *klass)
+static void gvir_config_capabilities_guest_arch_class_init(GVirConfigCapabilitiesGuestArchClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesGuestArchPrivate));
 }
 
 static void gvir_config_capabilities_guest_arch_init(GVirConfigCapabilitiesGuestArch *arch)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-guest-domain.c b/libvirt-gconfig/libvirt-gconfig-capabilities-guest-domain.c
index 3162ea1..5e438b1 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-guest-domain.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-guest-domain.c
@@ -35,12 +35,11 @@ struct _GVirConfigCapabilitiesGuestDomainPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigCapabilitiesGuestDomain, gvir_config_capabilities_guest_domain, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesGuestDomain, gvir_config_capabilities_guest_domain, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_capabilities_guest_domain_class_init(GVirConfigCapabilitiesGuestDomainClass *klass)
+static void gvir_config_capabilities_guest_domain_class_init(GVirConfigCapabilitiesGuestDomainClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesGuestDomainPrivate));
 }
 
 static void gvir_config_capabilities_guest_domain_init(GVirConfigCapabilitiesGuestDomain *domain)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-guest-feature.c b/libvirt-gconfig/libvirt-gconfig-capabilities-guest-feature.c
index 9e9533a..036f38b 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-guest-feature.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-guest-feature.c
@@ -35,11 +35,10 @@ struct _GVirConfigCapabilitiesGuestFeaturePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigCapabilitiesGuestFeature, gvir_config_capabilities_guest_feature, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesGuestFeature, gvir_config_capabilities_guest_feature, GVIR_CONFIG_TYPE_OBJECT);
 
-static void gvir_config_capabilities_guest_feature_class_init(GVirConfigCapabilitiesGuestFeatureClass *klass)
+static void gvir_config_capabilities_guest_feature_class_init(GVirConfigCapabilitiesGuestFeatureClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesGuestFeaturePrivate));
 }
 
 static void gvir_config_capabilities_guest_feature_init(GVirConfigCapabilitiesGuestFeature *feature)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-guest.c b/libvirt-gconfig/libvirt-gconfig-capabilities-guest.c
index 128b22f..4d4e499 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-guest.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-guest.c
@@ -35,12 +35,11 @@ struct _GVirConfigCapabilitiesGuestPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigCapabilitiesGuest, gvir_config_capabilities_guest, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesGuest, gvir_config_capabilities_guest, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_capabilities_guest_class_init(GVirConfigCapabilitiesGuestClass *klass)
+static void gvir_config_capabilities_guest_class_init(GVirConfigCapabilitiesGuestClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesGuestPrivate));
 }
 
 static void gvir_config_capabilities_guest_init(GVirConfigCapabilitiesGuest *guest)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-host-secmodel.c b/libvirt-gconfig/libvirt-gconfig-capabilities-host-secmodel.c
index 77e0593..2f76db2 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-host-secmodel.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-host-secmodel.c
@@ -33,11 +33,10 @@ struct _GVirConfigCapabilitiesHostSecModelPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigCapabilitiesHostSecModel, gvir_config_capabilities_host_secmodel, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesHostSecModel, gvir_config_capabilities_host_secmodel, GVIR_CONFIG_TYPE_OBJECT);
 
-static void gvir_config_capabilities_host_secmodel_class_init(GVirConfigCapabilitiesHostSecModelClass *klass)
+static void gvir_config_capabilities_host_secmodel_class_init(GVirConfigCapabilitiesHostSecModelClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesHostSecModelPrivate));
 }
 
 static void gvir_config_capabilities_host_secmodel_init(GVirConfigCapabilitiesHostSecModel *secmodel)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-host.c b/libvirt-gconfig/libvirt-gconfig-capabilities-host.c
index e26c2d0..30a574e 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-host.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-host.c
@@ -35,12 +35,11 @@ struct _GVirConfigCapabilitiesHostPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigCapabilitiesHost, gvir_config_capabilities_host, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilitiesHost, gvir_config_capabilities_host, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_capabilities_host_class_init(GVirConfigCapabilitiesHostClass *klass)
+static void gvir_config_capabilities_host_class_init(GVirConfigCapabilitiesHostClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesHostPrivate));
 }
 
 static void gvir_config_capabilities_host_init(GVirConfigCapabilitiesHost *host)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities.c b/libvirt-gconfig/libvirt-gconfig-capabilities.c
index 6cc5256..2b24696 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities.c
@@ -34,12 +34,11 @@ struct _GVirConfigCapabilitiesPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigCapabilities, gvir_config_capabilities, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigCapabilities, gvir_config_capabilities, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_capabilities_class_init(GVirConfigCapabilitiesClass *klass)
+static void gvir_config_capabilities_class_init(GVirConfigCapabilitiesClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigCapabilitiesPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-address-pci.c b/libvirt-gconfig/libvirt-gconfig-domain-address-pci.c
index 0105402..6b19702 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-address-pci.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-address-pci.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainAddressPciPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainAddressPci, gvir_config_domain_address_pci, GVIR_CONFIG_TYPE_DOMAIN_ADDRESS);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainAddressPci, gvir_config_domain_address_pci, GVIR_CONFIG_TYPE_DOMAIN_ADDRESS);
 
 
-static void gvir_config_domain_address_pci_class_init(GVirConfigDomainAddressPciClass *klass)
+static void gvir_config_domain_address_pci_class_init(GVirConfigDomainAddressPciClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainAddressPciPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-address-usb.c b/libvirt-gconfig/libvirt-gconfig-domain-address-usb.c
index a794922..8f31757 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-address-usb.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-address-usb.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainAddressUsbPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainAddressUsb, gvir_config_domain_address_usb, GVIR_CONFIG_TYPE_DOMAIN_ADDRESS);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainAddressUsb, gvir_config_domain_address_usb, GVIR_CONFIG_TYPE_DOMAIN_ADDRESS);
 
 
-static void gvir_config_domain_address_usb_class_init(GVirConfigDomainAddressUsbClass *klass)
+static void gvir_config_domain_address_usb_class_init(GVirConfigDomainAddressUsbClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainAddressUsbPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-address.c b/libvirt-gconfig/libvirt-gconfig-domain-address.c
index c0f6ba6..b070a1f 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-address.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-address.c
@@ -36,9 +36,8 @@ struct _GVirConfigDomainAddressPrivate
 G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainAddress, gvir_config_domain_address, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_domain_address_class_init(GVirConfigDomainAddressClass *klass)
+static void gvir_config_domain_address_class_init(GVirConfigDomainAddressClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainAddressPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-channel.c b/libvirt-gconfig/libvirt-gconfig-domain-channel.c
index 20e79e3..3e820dd 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-channel.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-channel.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainChannelPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainChannel, gvir_config_domain_channel, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainChannel, gvir_config_domain_channel, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
 
 
-static void gvir_config_domain_channel_class_init(GVirConfigDomainChannelClass *klass)
+static void gvir_config_domain_channel_class_init(GVirConfigDomainChannelClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainChannelPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.c b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.c
index c9fadc8..4ccd430 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.c
@@ -34,12 +34,11 @@ struct _GVirConfigDomainChardevSourcePtyPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainChardevSourcePty, gvir_config_domain_chardev_source_pty, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainChardevSourcePty, gvir_config_domain_chardev_source_pty, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
 
 
-static void gvir_config_domain_chardev_source_pty_class_init(GVirConfigDomainChardevSourcePtyClass *klass)
+static void gvir_config_domain_chardev_source_pty_class_init(GVirConfigDomainChardevSourcePtyClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainChardevSourcePtyPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c
index 98ff221..7f98578 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c
@@ -31,12 +31,11 @@ struct _GVirConfigDomainChardevSourceSpicePortPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainChardevSourceSpicePort, gvir_config_domain_chardev_source_spiceport, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainChardevSourceSpicePort, gvir_config_domain_chardev_source_spiceport, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
 
 
-static void gvir_config_domain_chardev_source_spiceport_class_init(GVirConfigDomainChardevSourceSpicePortClass *klass)
+static void gvir_config_domain_chardev_source_spiceport_class_init(GVirConfigDomainChardevSourceSpicePortClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainChardevSourceSpicePortPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spicevmc.c b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spicevmc.c
index d0b876b..2f63acb 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spicevmc.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spicevmc.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainChardevSourceSpiceVmcPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainChardevSourceSpiceVmc, gvir_config_domain_chardev_source_spicevmc, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainChardevSourceSpiceVmc, gvir_config_domain_chardev_source_spicevmc, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
 
 
-static void gvir_config_domain_chardev_source_spicevmc_class_init(GVirConfigDomainChardevSourceSpiceVmcClass *klass)
+static void gvir_config_domain_chardev_source_spicevmc_class_init(GVirConfigDomainChardevSourceSpiceVmcClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainChardevSourceSpiceVmcPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-unix.c b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-unix.c
index 069340f..854d413 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-unix.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-unix.c
@@ -34,12 +34,11 @@ struct _GVirConfigDomainChardevSourceUnixPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainChardevSourceUnix, gvir_config_domain_chardev_source_unix, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainChardevSourceUnix, gvir_config_domain_chardev_source_unix, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
 
 
-static void gvir_config_domain_chardev_source_unix_class_init(GVirConfigDomainChardevSourceUnixClass *klass)
+static void gvir_config_domain_chardev_source_unix_class_init(GVirConfigDomainChardevSourceUnixClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainChardevSourceUnixPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source.c b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source.c
index 117dbe1..50d4030 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source.c
@@ -37,9 +37,8 @@ struct _GVirConfigDomainChardevSourcePrivate
 G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainChardevSource, gvir_config_domain_chardev_source, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_domain_chardev_source_class_init(GVirConfigDomainChardevSourceClass *klass)
+static void gvir_config_domain_chardev_source_class_init(GVirConfigDomainChardevSourceClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainChardevSourcePrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev.c b/libvirt-gconfig/libvirt-gconfig-domain-chardev.c
index fd5e4c9..a5ebc9c 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-chardev.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev.c
@@ -36,9 +36,8 @@ struct _GVirConfigDomainChardevPrivate
 
 G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainChardev, gvir_config_domain_chardev, GVIR_CONFIG_TYPE_DOMAIN_DEVICE)
 
-static void gvir_config_domain_chardev_class_init(GVirConfigDomainChardevClass *klass)
+static void gvir_config_domain_chardev_class_init(GVirConfigDomainChardevClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainChardevPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-clock.c b/libvirt-gconfig/libvirt-gconfig-domain-clock.c
index 9795565..ae33623 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-clock.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-clock.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainClockPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainClock, gvir_config_domain_clock, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainClock, gvir_config_domain_clock, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_domain_clock_class_init(GVirConfigDomainClockClass *klass)
+static void gvir_config_domain_clock_class_init(GVirConfigDomainClockClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainClockPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-console.c b/libvirt-gconfig/libvirt-gconfig-domain-console.c
index 5192870..ae75e11 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-console.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-console.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainConsolePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainConsole, gvir_config_domain_console, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainConsole, gvir_config_domain_console, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
 
 
-static void gvir_config_domain_console_class_init(GVirConfigDomainConsoleClass *klass)
+static void gvir_config_domain_console_class_init(GVirConfigDomainConsoleClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainConsolePrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.c b/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.c
index 4262465..a15db27 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-controller-usb.c
@@ -111,12 +111,11 @@ struct _GVirConfigDomainControllerUsbPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainControllerUsb, gvir_config_domain_controller_usb, GVIR_CONFIG_TYPE_DOMAIN_CONTROLLER);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainControllerUsb, gvir_config_domain_controller_usb, GVIR_CONFIG_TYPE_DOMAIN_CONTROLLER);
 
 
-static void gvir_config_domain_controller_usb_class_init(GVirConfigDomainControllerUsbClass *klass)
+static void gvir_config_domain_controller_usb_class_init(GVirConfigDomainControllerUsbClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainControllerUsbPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-controller.c b/libvirt-gconfig/libvirt-gconfig-domain-controller.c
index 82994fe..a2d40c3 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-controller.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-controller.c
@@ -36,9 +36,8 @@ struct _GVirConfigDomainControllerPrivate
 G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainController, gvir_config_domain_controller, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
 
 
-static void gvir_config_domain_controller_class_init(GVirConfigDomainControllerClass *klass)
+static void gvir_config_domain_controller_class_init(GVirConfigDomainControllerClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainControllerPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-cpu-feature.c b/libvirt-gconfig/libvirt-gconfig-domain-cpu-feature.c
index dc5fa4e..61f0465 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-cpu-feature.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-cpu-feature.c
@@ -35,11 +35,10 @@ struct _GVirConfigDomainCpuFeaturePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainCpuFeature, gvir_config_domain_cpu_feature, GVIR_CONFIG_TYPE_CAPABILITIES_CPU_FEATURE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainCpuFeature, gvir_config_domain_cpu_feature, GVIR_CONFIG_TYPE_CAPABILITIES_CPU_FEATURE);
 
-static void gvir_config_domain_cpu_feature_class_init(GVirConfigDomainCpuFeatureClass *klass)
+static void gvir_config_domain_cpu_feature_class_init(GVirConfigDomainCpuFeatureClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainCpuFeaturePrivate));
 }
 
 static void gvir_config_domain_cpu_feature_init(GVirConfigDomainCpuFeature *feature)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-cpu-model.c b/libvirt-gconfig/libvirt-gconfig-domain-cpu-model.c
index 06a3ec8..6478427 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-cpu-model.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-cpu-model.c
@@ -33,13 +33,12 @@ struct _GVirConfigDomainCpuModelPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainCpuModel,
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainCpuModel,
               gvir_config_domain_cpu_model,
               GVIR_CONFIG_TYPE_CAPABILITIES_CPU_MODEL);
 
-static void gvir_config_domain_cpu_model_class_init(GVirConfigDomainCpuModelClass *klass)
+static void gvir_config_domain_cpu_model_class_init(GVirConfigDomainCpuModelClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainCpuModelPrivate));
 }
 
 static void gvir_config_domain_cpu_model_init(GVirConfigDomainCpuModel *model)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-cpu.c b/libvirt-gconfig/libvirt-gconfig-domain-cpu.c
index 2dffae3..55a2704 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-cpu.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-cpu.c
@@ -35,7 +35,7 @@ struct _GVirConfigDomainCpuPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainCpu, gvir_config_domain_cpu, GVIR_CONFIG_TYPE_CAPABILITIES_CPU);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainCpu, gvir_config_domain_cpu, GVIR_CONFIG_TYPE_CAPABILITIES_CPU);
 
 static GList *
 _gvir_config_domain_cpu_get_features(GVirConfigCapabilitiesCpu *cpu);
@@ -47,7 +47,6 @@ static void gvir_config_domain_cpu_class_init(GVirConfigDomainCpuClass *klass)
     capabilities_class = GVIR_CONFIG_CAPABILITIES_CPU_CLASS(klass);
     capabilities_class->get_features = _gvir_config_domain_cpu_get_features;
 
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainCpuPrivate));
 }
 
 static void gvir_config_domain_cpu_init(GVirConfigDomainCpu *cpu)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-device.c b/libvirt-gconfig/libvirt-gconfig-domain-device.c
index 2475519..b585b39 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-device.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-device.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainDevicePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainDevice, gvir_config_domain_device, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainDevice, gvir_config_domain_device, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_domain_device_class_init(GVirConfigDomainDeviceClass *klass)
+static void gvir_config_domain_device_class_init(GVirConfigDomainDeviceClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainDevicePrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-disk-driver.c b/libvirt-gconfig/libvirt-gconfig-domain-disk-driver.c
index fb05e18..464fb1a 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-disk-driver.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-disk-driver.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainDiskDriverPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainDiskDriver, gvir_config_domain_disk_driver, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainDiskDriver, gvir_config_domain_disk_driver, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_domain_disk_driver_class_init(GVirConfigDomainDiskDriverClass *klass)
+static void gvir_config_domain_disk_driver_class_init(GVirConfigDomainDiskDriverClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainDiskDriverPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-disk.c b/libvirt-gconfig/libvirt-gconfig-domain-disk.c
index 75aaa12..d97a285 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-disk.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-disk.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainDiskPrivate
     GVirConfigDomainDiskType type;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainDisk, gvir_config_domain_disk, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainDisk, gvir_config_domain_disk, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
 
 
-static void gvir_config_domain_disk_class_init(GVirConfigDomainDiskClass *klass)
+static void gvir_config_domain_disk_class_init(GVirConfigDomainDiskClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainDiskPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-filesys.c b/libvirt-gconfig/libvirt-gconfig-domain-filesys.c
index 56c3a01..9a029e4 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-filesys.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-filesys.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainFilesysPrivate
     GVirConfigDomainFilesysType type;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainFilesys, gvir_config_domain_filesys, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainFilesys, gvir_config_domain_filesys, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
 
 
-static void gvir_config_domain_filesys_class_init(GVirConfigDomainFilesysClass *klass)
+static void gvir_config_domain_filesys_class_init(GVirConfigDomainFilesysClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainFilesysPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.c
index dadf684..2ae984f 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-desktop.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainGraphicsDesktopPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainGraphicsDesktop, gvir_config_domain_graphics_desktop, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainGraphicsDesktop, gvir_config_domain_graphics_desktop, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
 
 
-static void gvir_config_domain_graphics_desktop_class_init(GVirConfigDomainGraphicsDesktopClass *klass)
+static void gvir_config_domain_graphics_desktop_class_init(GVirConfigDomainGraphicsDesktopClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainGraphicsDesktopPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c
index 7a2cb4d..4f7ef0f 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-rdp.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainGraphicsRdpPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainGraphicsRdp, gvir_config_domain_graphics_rdp, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainGraphicsRdp, gvir_config_domain_graphics_rdp, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
 
 
-static void gvir_config_domain_graphics_rdp_class_init(GVirConfigDomainGraphicsRdpClass *klass)
+static void gvir_config_domain_graphics_rdp_class_init(GVirConfigDomainGraphicsRdpClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainGraphicsRdpPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c
index 1740494..cbf8410 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainGraphicsSdlPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainGraphicsSdl, gvir_config_domain_graphics_sdl, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainGraphicsSdl, gvir_config_domain_graphics_sdl, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
 
 
-static void gvir_config_domain_graphics_sdl_class_init(GVirConfigDomainGraphicsSdlClass *klass)
+static void gvir_config_domain_graphics_sdl_class_init(GVirConfigDomainGraphicsSdlClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainGraphicsSdlPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
index 079ea27..9e3570e 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
@@ -34,12 +34,11 @@ struct _GVirConfigDomainGraphicsSpicePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainGraphicsSpice, gvir_config_domain_graphics_spice, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainGraphicsSpice, gvir_config_domain_graphics_spice, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
 
 
-static void gvir_config_domain_graphics_spice_class_init(GVirConfigDomainGraphicsSpiceClass *klass)
+static void gvir_config_domain_graphics_spice_class_init(GVirConfigDomainGraphicsSpiceClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainGraphicsSpicePrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
index fc26bb9..4c78b11 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainGraphicsVncPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainGraphicsVnc, gvir_config_domain_graphics_vnc, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainGraphicsVnc, gvir_config_domain_graphics_vnc, GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS);
 
 
-static void gvir_config_domain_graphics_vnc_class_init(GVirConfigDomainGraphicsVncClass *klass)
+static void gvir_config_domain_graphics_vnc_class_init(GVirConfigDomainGraphicsVncClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainGraphicsVncPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics.c
index 8b06e95..e35976f 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics.c
@@ -36,9 +36,8 @@ struct _GVirConfigDomainGraphicsPrivate
 G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainGraphics, gvir_config_domain_graphics, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
 
 
-static void gvir_config_domain_graphics_class_init(GVirConfigDomainGraphicsClass *klass)
+static void gvir_config_domain_graphics_class_init(GVirConfigDomainGraphicsClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainGraphicsPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-hostdev-pci.c b/libvirt-gconfig/libvirt-gconfig-domain-hostdev-pci.c
index c789c9c..36841e5 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-hostdev-pci.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-hostdev-pci.c
@@ -34,11 +34,10 @@ struct _GVirConfigDomainHostdevPciPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainHostdevPci, gvir_config_domain_hostdev_pci, GVIR_CONFIG_TYPE_DOMAIN_HOSTDEV);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainHostdevPci, gvir_config_domain_hostdev_pci, GVIR_CONFIG_TYPE_DOMAIN_HOSTDEV);
 
-static void gvir_config_domain_hostdev_pci_class_init(GVirConfigDomainHostdevPciClass *klass)
+static void gvir_config_domain_hostdev_pci_class_init(GVirConfigDomainHostdevPciClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainHostdevPciPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-hostdev.c b/libvirt-gconfig/libvirt-gconfig-domain-hostdev.c
index 459674d..ade2dc3 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-hostdev.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-hostdev.c
@@ -37,9 +37,8 @@ struct _GVirConfigDomainHostdevPrivate
 G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainHostdev, gvir_config_domain_hostdev, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
 
 
-static void gvir_config_domain_hostdev_class_init(GVirConfigDomainHostdevClass *klass)
+static void gvir_config_domain_hostdev_class_init(GVirConfigDomainHostdevClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainHostdevPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-input.c b/libvirt-gconfig/libvirt-gconfig-domain-input.c
index 7734c61..9d7de77 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-input.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-input.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainInputPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainInput, gvir_config_domain_input, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainInput, gvir_config_domain_input, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
 
 
-static void gvir_config_domain_input_class_init(GVirConfigDomainInputClass *klass)
+static void gvir_config_domain_input_class_init(GVirConfigDomainInputClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainInputPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface-bridge.c b/libvirt-gconfig/libvirt-gconfig-domain-interface-bridge.c
index a10b3c1..33ba27b 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface-bridge.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface-bridge.c
@@ -36,12 +36,11 @@ struct _GVirConfigDomainInterfaceBridgePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainInterfaceBridge, gvir_config_domain_interface_bridge, GVIR_CONFIG_TYPE_DOMAIN_INTERFACE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainInterfaceBridge, gvir_config_domain_interface_bridge, GVIR_CONFIG_TYPE_DOMAIN_INTERFACE);
 
 
-static void gvir_config_domain_interface_bridge_class_init(GVirConfigDomainInterfaceBridgeClass *klass)
+static void gvir_config_domain_interface_bridge_class_init(GVirConfigDomainInterfaceBridgeClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainInterfaceBridgePrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref-parameter.c b/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref-parameter.c
index abca213..e166482 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref-parameter.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref-parameter.c
@@ -35,11 +35,10 @@ struct _GVirConfigDomainInterfaceFilterrefParameterPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainInterfaceFilterrefParameter, gvir_config_domain_interface_filterref_parameter, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainInterfaceFilterrefParameter, gvir_config_domain_interface_filterref_parameter, GVIR_CONFIG_TYPE_OBJECT);
 
-static void gvir_config_domain_interface_filterref_parameter_class_init(GVirConfigDomainInterfaceFilterrefParameterClass *klass)
+static void gvir_config_domain_interface_filterref_parameter_class_init(GVirConfigDomainInterfaceFilterrefParameterClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainInterfaceFilterrefParameterPrivate));
 }
 
 static void gvir_config_domain_interface_filterref_parameter_init(GVirConfigDomainInterfaceFilterrefParameter *parameter)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref.c b/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref.c
index 132d9f5..a73b6a8 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface-filterref.c
@@ -34,11 +34,10 @@ struct _GVirConfigDomainInterfaceFilterrefPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainInterfaceFilterref, gvir_config_domain_interface_filterref, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainInterfaceFilterref, gvir_config_domain_interface_filterref, GVIR_CONFIG_TYPE_OBJECT);
 
-static void gvir_config_domain_interface_filterref_class_init(GVirConfigDomainInterfaceFilterrefClass *klass)
+static void gvir_config_domain_interface_filterref_class_init(GVirConfigDomainInterfaceFilterrefClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainInterfaceFilterrefPrivate));
 }
 
 static void gvir_config_domain_interface_filterref_init(GVirConfigDomainInterfaceFilterref *filterref)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface-network.c b/libvirt-gconfig/libvirt-gconfig-domain-interface-network.c
index 27ad6ed..7083ad1 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface-network.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface-network.c
@@ -35,12 +35,11 @@ struct _GVirConfigDomainInterfaceNetworkPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainInterfaceNetwork, gvir_config_domain_interface_network, GVIR_CONFIG_TYPE_DOMAIN_INTERFACE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainInterfaceNetwork, gvir_config_domain_interface_network, GVIR_CONFIG_TYPE_DOMAIN_INTERFACE);
 
 
-static void gvir_config_domain_interface_network_class_init(GVirConfigDomainInterfaceNetworkClass *klass)
+static void gvir_config_domain_interface_network_class_init(GVirConfigDomainInterfaceNetworkClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainInterfaceNetworkPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface-user.c b/libvirt-gconfig/libvirt-gconfig-domain-interface-user.c
index d5672d6..514d49c 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface-user.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface-user.c
@@ -35,12 +35,11 @@ struct _GVirConfigDomainInterfaceUserPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainInterfaceUser, gvir_config_domain_interface_user, GVIR_CONFIG_TYPE_DOMAIN_INTERFACE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainInterfaceUser, gvir_config_domain_interface_user, GVIR_CONFIG_TYPE_DOMAIN_INTERFACE);
 
 
-static void gvir_config_domain_interface_user_class_init(GVirConfigDomainInterfaceUserClass *klass)
+static void gvir_config_domain_interface_user_class_init(GVirConfigDomainInterfaceUserClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainInterfaceUserPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface.c b/libvirt-gconfig/libvirt-gconfig-domain-interface.c
index c5b57bd..2b841b3 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface.c
@@ -38,9 +38,8 @@ struct _GVirConfigDomainInterfacePrivate
 G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainInterface, gvir_config_domain_interface, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
 
 
-static void gvir_config_domain_interface_class_init(GVirConfigDomainInterfaceClass *klass)
+static void gvir_config_domain_interface_class_init(GVirConfigDomainInterfaceClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainInterfacePrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-memballoon.c b/libvirt-gconfig/libvirt-gconfig-domain-memballoon.c
index c5d7768..509064e 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-memballoon.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-memballoon.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainMemballoonPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainMemballoon, gvir_config_domain_memballoon, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainMemballoon, gvir_config_domain_memballoon, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
 
 
-static void gvir_config_domain_memballoon_class_init(GVirConfigDomainMemballoonClass *klass)
+static void gvir_config_domain_memballoon_class_init(GVirConfigDomainMemballoonClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainMemballoonPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-os.c b/libvirt-gconfig/libvirt-gconfig-domain-os.c
index 9a00ef4..f12e1e7 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-os.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-os.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainOsPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainOs, gvir_config_domain_os, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainOs, gvir_config_domain_os, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_domain_os_class_init(GVirConfigDomainOsClass *klass)
+static void gvir_config_domain_os_class_init(GVirConfigDomainOsClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainOsPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-parallel.c b/libvirt-gconfig/libvirt-gconfig-domain-parallel.c
index f48d1b6..d523f06 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-parallel.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-parallel.c
@@ -32,12 +32,11 @@ struct _GVirConfigDomainParallelPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainParallel, gvir_config_domain_parallel, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainParallel, gvir_config_domain_parallel, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
 
 
-static void gvir_config_domain_parallel_class_init(GVirConfigDomainParallelClass *klass)
+static void gvir_config_domain_parallel_class_init(GVirConfigDomainParallelClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainParallelPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-power-management.c b/libvirt-gconfig/libvirt-gconfig-domain-power-management.c
index c070a0f..7488e7a 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-power-management.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-power-management.c
@@ -38,14 +38,13 @@ struct _GVirConfigDomainPowerManagementPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainPowerManagement,
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainPowerManagement,
               gvir_config_domain_power_management,
               GVIR_CONFIG_TYPE_OBJECT);
 
 static void gvir_config_domain_power_management_class_init
-        (GVirConfigDomainPowerManagementClass *klass)
+        (GVirConfigDomainPowerManagementClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainPowerManagementPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-redirdev.c b/libvirt-gconfig/libvirt-gconfig-domain-redirdev.c
index 5fd4dda..1d1b321 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-redirdev.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-redirdev.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainRedirdevPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainRedirdev, gvir_config_domain_redirdev, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainRedirdev, gvir_config_domain_redirdev, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
 
 
-static void gvir_config_domain_redirdev_class_init(GVirConfigDomainRedirdevClass *klass)
+static void gvir_config_domain_redirdev_class_init(GVirConfigDomainRedirdevClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainRedirdevPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-seclabel.c b/libvirt-gconfig/libvirt-gconfig-domain-seclabel.c
index 77d8aa0..acb8fa2 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-seclabel.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-seclabel.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainSeclabelPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainSeclabel, gvir_config_domain_seclabel, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSeclabel, gvir_config_domain_seclabel, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_domain_seclabel_class_init(GVirConfigDomainSeclabelClass *klass)
+static void gvir_config_domain_seclabel_class_init(GVirConfigDomainSeclabelClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainSeclabelPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-serial.c b/libvirt-gconfig/libvirt-gconfig-domain-serial.c
index 84adb2a..2523f4a 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-serial.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-serial.c
@@ -32,12 +32,11 @@ struct _GVirConfigDomainSerialPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainSerial, gvir_config_domain_serial, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSerial, gvir_config_domain_serial, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV);
 
 
-static void gvir_config_domain_serial_class_init(GVirConfigDomainSerialClass *klass)
+static void gvir_config_domain_serial_class_init(GVirConfigDomainSerialClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainSerialPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host-certificates.c b/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host-certificates.c
index ab5abc4..be90d3a 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host-certificates.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host-certificates.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainSmartcardHostCertificatesPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainSmartcardHostCertificates, gvir_config_domain_smartcard_host_certificates, GVIR_CONFIG_TYPE_DOMAIN_SMARTCARD);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSmartcardHostCertificates, gvir_config_domain_smartcard_host_certificates, GVIR_CONFIG_TYPE_DOMAIN_SMARTCARD);
 
 
-static void gvir_config_domain_smartcard_host_certificates_class_init(GVirConfigDomainSmartcardHostCertificatesClass *klass)
+static void gvir_config_domain_smartcard_host_certificates_class_init(GVirConfigDomainSmartcardHostCertificatesClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainSmartcardHostCertificatesPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host.c b/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host.c
index b29e07b..4ef8b90 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-smartcard-host.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainSmartcardHostPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainSmartcardHost, gvir_config_domain_smartcard_host, GVIR_CONFIG_TYPE_DOMAIN_SMARTCARD);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSmartcardHost, gvir_config_domain_smartcard_host, GVIR_CONFIG_TYPE_DOMAIN_SMARTCARD);
 
 
-static void gvir_config_domain_smartcard_host_class_init(GVirConfigDomainSmartcardHostClass *klass)
+static void gvir_config_domain_smartcard_host_class_init(GVirConfigDomainSmartcardHostClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainSmartcardHostPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-smartcard-passthrough.c b/libvirt-gconfig/libvirt-gconfig-domain-smartcard-passthrough.c
index 830faa4..2d2fb97 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-smartcard-passthrough.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-smartcard-passthrough.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainSmartcardPassthroughPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainSmartcardPassthrough, gvir_config_domain_smartcard_passthrough, GVIR_CONFIG_TYPE_DOMAIN_SMARTCARD);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSmartcardPassthrough, gvir_config_domain_smartcard_passthrough, GVIR_CONFIG_TYPE_DOMAIN_SMARTCARD);
 
 
-static void gvir_config_domain_smartcard_passthrough_class_init(GVirConfigDomainSmartcardPassthroughClass *klass)
+static void gvir_config_domain_smartcard_passthrough_class_init(GVirConfigDomainSmartcardPassthroughClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainSmartcardPassthroughPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-smartcard.c b/libvirt-gconfig/libvirt-gconfig-domain-smartcard.c
index 7900c1a..f7c65f0 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-smartcard.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-smartcard.c
@@ -36,9 +36,8 @@ struct _GVirConfigDomainSmartcardPrivate
 G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainSmartcard, gvir_config_domain_smartcard, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
 
 
-static void gvir_config_domain_smartcard_class_init(GVirConfigDomainSmartcardClass *klass)
+static void gvir_config_domain_smartcard_class_init(GVirConfigDomainSmartcardClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainSmartcardPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-snapshot-disk.c b/libvirt-gconfig/libvirt-gconfig-domain-snapshot-disk.c
index ba7a40e..041f6db 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-snapshot-disk.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-snapshot-disk.c
@@ -34,12 +34,11 @@ struct _GVirConfigDomainSnapshotDiskPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainSnapshotDisk, gvir_config_domain_snapshot_disk, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSnapshotDisk, gvir_config_domain_snapshot_disk, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_domain_snapshot_disk_class_init(GVirConfigDomainSnapshotDiskClass *klass)
+static void gvir_config_domain_snapshot_disk_class_init(GVirConfigDomainSnapshotDiskClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainSnapshotDiskPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c b/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c
index 69b7df7..ae79932 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c
@@ -35,12 +35,11 @@ struct _GVirConfigDomainSnapshotPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainSnapshot, gvir_config_domain_snapshot, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSnapshot, gvir_config_domain_snapshot, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_domain_snapshot_class_init(GVirConfigDomainSnapshotClass *klass)
+static void gvir_config_domain_snapshot_class_init(GVirConfigDomainSnapshotClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainSnapshotPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-sound.c b/libvirt-gconfig/libvirt-gconfig-domain-sound.c
index 7ce71bd..937143c 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-sound.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-sound.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainSoundPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainSound, gvir_config_domain_sound, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainSound, gvir_config_domain_sound, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
 
 
-static void gvir_config_domain_sound_class_init(GVirConfigDomainSoundClass *klass)
+static void gvir_config_domain_sound_class_init(GVirConfigDomainSoundClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainSoundPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-timer-hpet.c b/libvirt-gconfig/libvirt-gconfig-domain-timer-hpet.c
index ba74a28..ba24cb9 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-timer-hpet.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-timer-hpet.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainTimerHpetPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainTimerHpet, gvir_config_domain_timer_hpet, GVIR_CONFIG_TYPE_DOMAIN_TIMER);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainTimerHpet, gvir_config_domain_timer_hpet, GVIR_CONFIG_TYPE_DOMAIN_TIMER);
 
 
-static void gvir_config_domain_timer_hpet_class_init(GVirConfigDomainTimerHpetClass *klass)
+static void gvir_config_domain_timer_hpet_class_init(GVirConfigDomainTimerHpetClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainTimerHpetPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-timer-pit.c b/libvirt-gconfig/libvirt-gconfig-domain-timer-pit.c
index af979b2..1bc13b4 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-timer-pit.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-timer-pit.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainTimerPitPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainTimerPit, gvir_config_domain_timer_pit, GVIR_CONFIG_TYPE_DOMAIN_TIMER);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainTimerPit, gvir_config_domain_timer_pit, GVIR_CONFIG_TYPE_DOMAIN_TIMER);
 
 
-static void gvir_config_domain_timer_pit_class_init(GVirConfigDomainTimerPitClass *klass)
+static void gvir_config_domain_timer_pit_class_init(GVirConfigDomainTimerPitClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainTimerPitPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-timer-rtc.c b/libvirt-gconfig/libvirt-gconfig-domain-timer-rtc.c
index 0adcc66..06a76c8 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-timer-rtc.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-timer-rtc.c
@@ -33,12 +33,11 @@ struct _GVirConfigDomainTimerRtcPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainTimerRtc, gvir_config_domain_timer_rtc, GVIR_CONFIG_TYPE_DOMAIN_TIMER);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainTimerRtc, gvir_config_domain_timer_rtc, GVIR_CONFIG_TYPE_DOMAIN_TIMER);
 
 
-static void gvir_config_domain_timer_rtc_class_init(GVirConfigDomainTimerRtcClass *klass)
+static void gvir_config_domain_timer_rtc_class_init(GVirConfigDomainTimerRtcClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainTimerRtcPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-timer.c b/libvirt-gconfig/libvirt-gconfig-domain-timer.c
index e89e111..f33a56f 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-timer.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-timer.c
@@ -36,9 +36,8 @@ struct _GVirConfigDomainTimerPrivate
 G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainTimer, gvir_config_domain_timer, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_domain_timer_class_init(GVirConfigDomainTimerClass *klass)
+static void gvir_config_domain_timer_class_init(GVirConfigDomainTimerClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainTimerPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-video.c b/libvirt-gconfig/libvirt-gconfig-domain-video.c
index ed11476..3a98cf0 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-video.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-video.c
@@ -34,12 +34,11 @@ struct _GVirConfigDomainVideoPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomainVideo, gvir_config_domain_video, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainVideo, gvir_config_domain_video, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
 
 
-static void gvir_config_domain_video_class_init(GVirConfigDomainVideoClass *klass)
+static void gvir_config_domain_video_class_init(GVirConfigDomainVideoClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainVideoPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c b/libvirt-gconfig/libvirt-gconfig-domain.c
index de84fd4..82f8516 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain.c
@@ -34,7 +34,7 @@ struct _GVirConfigDomainPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigDomain, gvir_config_domain, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomain, gvir_config_domain, GVIR_CONFIG_TYPE_OBJECT);
 
 enum {
     PROP_0,
@@ -128,7 +128,6 @@ static void gvir_config_domain_class_init(GVirConfigDomainClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS(klass);
 
-    g_type_class_add_private(klass, sizeof(GVirConfigDomainPrivate));
 
     object_class->get_property = gvir_config_domain_get_property;
     object_class->set_property = gvir_config_domain_set_property;
diff --git a/libvirt-gconfig/libvirt-gconfig-interface.c b/libvirt-gconfig/libvirt-gconfig-interface.c
index 6c81325..dbf261a 100644
--- a/libvirt-gconfig/libvirt-gconfig-interface.c
+++ b/libvirt-gconfig/libvirt-gconfig-interface.c
@@ -33,12 +33,11 @@ struct _GVirConfigInterfacePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigInterface, gvir_config_interface, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigInterface, gvir_config_interface, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_interface_class_init(GVirConfigInterfaceClass *klass)
+static void gvir_config_interface_class_init(GVirConfigInterfaceClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigInterfacePrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-network-filter.c b/libvirt-gconfig/libvirt-gconfig-network-filter.c
index eddf05c..b1b1476 100644
--- a/libvirt-gconfig/libvirt-gconfig-network-filter.c
+++ b/libvirt-gconfig/libvirt-gconfig-network-filter.c
@@ -33,12 +33,11 @@ struct _GVirConfigNetworkFilterPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigNetworkFilter, gvir_config_network_filter, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigNetworkFilter, gvir_config_network_filter, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_network_filter_class_init(GVirConfigNetworkFilterClass *klass)
+static void gvir_config_network_filter_class_init(GVirConfigNetworkFilterClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigNetworkFilterPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-network.c b/libvirt-gconfig/libvirt-gconfig-network.c
index 963d056..14e76bb 100644
--- a/libvirt-gconfig/libvirt-gconfig-network.c
+++ b/libvirt-gconfig/libvirt-gconfig-network.c
@@ -33,12 +33,11 @@ struct _GVirConfigNetworkPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigNetwork, gvir_config_network, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigNetwork, gvir_config_network, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_network_class_init(GVirConfigNetworkClass *klass)
+static void gvir_config_network_class_init(GVirConfigNetworkClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigNetworkPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-node-device.c b/libvirt-gconfig/libvirt-gconfig-node-device.c
index b89690f..40bd415 100644
--- a/libvirt-gconfig/libvirt-gconfig-node-device.c
+++ b/libvirt-gconfig/libvirt-gconfig-node-device.c
@@ -33,12 +33,11 @@ struct _GVirConfigNodeDevicePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigNodeDevice, gvir_config_node_device, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigNodeDevice, gvir_config_node_device, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_node_device_class_init(GVirConfigNodeDeviceClass *klass)
+static void gvir_config_node_device_class_init(GVirConfigNodeDeviceClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigNodeDevicePrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-object.c b/libvirt-gconfig/libvirt-gconfig-object.c
index ca2c6e6..fffbd21 100644
--- a/libvirt-gconfig/libvirt-gconfig-object.c
+++ b/libvirt-gconfig/libvirt-gconfig-object.c
@@ -42,7 +42,7 @@ struct _GVirConfigObjectPrivate
     xmlNodePtr node;
 };
 
-G_DEFINE_TYPE(GVirConfigObject, gvir_config_object, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigObject, gvir_config_object, G_TYPE_OBJECT);
 
 enum {
     PROP_0,
@@ -175,8 +175,6 @@ static void gvir_config_object_class_init(GVirConfigObjectClass *klass)
                                                         G_PARAM_READWRITE |
                                                         G_PARAM_CONSTRUCT_ONLY |
                                                         G_PARAM_STATIC_STRINGS));
-
-    g_type_class_add_private(klass, sizeof(GVirConfigObjectPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-secret.c b/libvirt-gconfig/libvirt-gconfig-secret.c
index 73a3fc3..5bdb53a 100644
--- a/libvirt-gconfig/libvirt-gconfig-secret.c
+++ b/libvirt-gconfig/libvirt-gconfig-secret.c
@@ -33,12 +33,11 @@ struct _GVirConfigSecretPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigSecret, gvir_config_secret, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigSecret, gvir_config_secret, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_secret_class_init(GVirConfigSecretClass *klass)
+static void gvir_config_secret_class_init(GVirConfigSecretClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigSecretPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-permissions.c b/libvirt-gconfig/libvirt-gconfig-storage-permissions.c
index 79c3b9e..886c6de 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-permissions.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-permissions.c
@@ -33,12 +33,11 @@ struct _GVirConfigStoragePermissionsPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigStoragePermissions, gvir_config_storage_permissions, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigStoragePermissions, gvir_config_storage_permissions, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_storage_permissions_class_init(GVirConfigStoragePermissionsClass *klass)
+static void gvir_config_storage_permissions_class_init(GVirConfigStoragePermissionsClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigStoragePermissionsPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool-source.c b/libvirt-gconfig/libvirt-gconfig-storage-pool-source.c
index 07af50b..987b97d 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-pool-source.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-pool-source.c
@@ -34,12 +34,11 @@ struct _GVirConfigStoragePoolSourcePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigStoragePoolSource, gvir_config_storage_pool_source, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigStoragePoolSource, gvir_config_storage_pool_source, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_storage_pool_source_class_init(GVirConfigStoragePoolSourceClass *klass)
+static void gvir_config_storage_pool_source_class_init(GVirConfigStoragePoolSourceClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigStoragePoolSourcePrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c b/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c
index 72ea21d..a686479 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c
@@ -34,12 +34,11 @@ struct _GVirConfigStoragePoolTargetPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigStoragePoolTarget, gvir_config_storage_pool_target, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigStoragePoolTarget, gvir_config_storage_pool_target, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_storage_pool_target_class_init(GVirConfigStoragePoolTargetClass *klass)
+static void gvir_config_storage_pool_target_class_init(GVirConfigStoragePoolTargetClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigStoragePoolTargetPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool.c b/libvirt-gconfig/libvirt-gconfig-storage-pool.c
index 0c7940d..72cfa28 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-pool.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-pool.c
@@ -35,12 +35,11 @@ struct _GVirConfigStoragePoolPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigStoragePool, gvir_config_storage_pool, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigStoragePool, gvir_config_storage_pool, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_storage_pool_class_init(GVirConfigStoragePoolClass *klass)
+static void gvir_config_storage_pool_class_init(GVirConfigStoragePoolClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigStoragePoolPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c b/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c
index 14a0e22..b574af0 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c
@@ -34,12 +34,11 @@ struct _GVirConfigStorageVolBackingStorePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigStorageVolBackingStore, gvir_config_storage_vol_backing_store, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigStorageVolBackingStore, gvir_config_storage_vol_backing_store, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_storage_vol_backing_store_class_init(GVirConfigStorageVolBackingStoreClass *klass)
+static void gvir_config_storage_vol_backing_store_class_init(GVirConfigStorageVolBackingStoreClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigStorageVolBackingStorePrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c b/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c
index cf4c0c7..751c950 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c
@@ -34,12 +34,11 @@ struct _GVirConfigStorageVolTargetPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigStorageVolTarget, gvir_config_storage_vol_target, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigStorageVolTarget, gvir_config_storage_vol_target, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_storage_vol_target_class_init(GVirConfigStorageVolTargetClass *klass)
+static void gvir_config_storage_vol_target_class_init(GVirConfigStorageVolTargetClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigStorageVolTargetPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol.c b/libvirt-gconfig/libvirt-gconfig-storage-vol.c
index 2dade7e..76ac105 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-vol.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-vol.c
@@ -35,12 +35,11 @@ struct _GVirConfigStorageVolPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirConfigStorageVol, gvir_config_storage_vol, GVIR_CONFIG_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigStorageVol, gvir_config_storage_vol, GVIR_CONFIG_TYPE_OBJECT);
 
 
-static void gvir_config_storage_vol_class_init(GVirConfigStorageVolClass *klass)
+static void gvir_config_storage_vol_class_init(GVirConfigStorageVolClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirConfigStorageVolPrivate));
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-xml-doc.c b/libvirt-gconfig/libvirt-gconfig-xml-doc.c
index d17da21..fd461d7 100644
--- a/libvirt-gconfig/libvirt-gconfig-xml-doc.c
+++ b/libvirt-gconfig/libvirt-gconfig-xml-doc.c
@@ -37,7 +37,7 @@ struct _GVirConfigXmlDocPrivate
     xmlDocPtr doc;
 };
 
-G_DEFINE_TYPE(GVirConfigXmlDoc, gvir_config_xml_doc, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigXmlDoc, gvir_config_xml_doc, G_TYPE_OBJECT);
 
 enum {
     PROP_0,
@@ -90,7 +90,6 @@ static void gvir_config_xml_doc_class_init(GVirConfigXmlDocClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS(klass);
 
-    g_type_class_add_private(klass, sizeof(GVirConfigXmlDocPrivate));
 
     object_class->finalize = gvir_config_xml_doc_finalize;
     object_class->get_property = gvir_config_xml_doc_get_property;
diff --git a/libvirt-gobject/libvirt-gobject-connection.c b/libvirt-gobject/libvirt-gobject-connection.c
index 3f17265..b8f88b3 100644
--- a/libvirt-gobject/libvirt-gobject-connection.c
+++ b/libvirt-gobject/libvirt-gobject-connection.c
@@ -48,7 +48,7 @@ struct _GVirConnectionPrivate
     GHashTable *networks;
 };
 
-G_DEFINE_TYPE(GVirConnection, gvir_connection, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirConnection, gvir_connection, G_TYPE_OBJECT);
 
 
 enum {
@@ -231,7 +231,6 @@ static void gvir_connection_class_init(GVirConnectionClass *klass)
                  1,
                  GVIR_TYPE_DOMAIN);
 
-    g_type_class_add_private(klass, sizeof(GVirConnectionPrivate));
 }
 
 
diff --git a/libvirt-gobject/libvirt-gobject-domain-device.c b/libvirt-gobject/libvirt-gobject-domain-device.c
index 8986e44..c113941 100644
--- a/libvirt-gobject/libvirt-gobject-domain-device.c
+++ b/libvirt-gobject/libvirt-gobject-domain-device.c
@@ -135,7 +135,6 @@ static void gvir_domain_device_class_init(GVirDomainDeviceClass *klass)
                                                         G_PARAM_CONSTRUCT_ONLY |
                                                         G_PARAM_STATIC_STRINGS));
 
-    g_type_class_add_private(klass, sizeof(GVirDomainDevicePrivate));
 }
 
 static void gvir_domain_device_init(GVirDomainDevice *self)
diff --git a/libvirt-gobject/libvirt-gobject-domain-disk.c b/libvirt-gobject/libvirt-gobject-domain-disk.c
index bb2a682..f0cb848 100644
--- a/libvirt-gobject/libvirt-gobject-domain-disk.c
+++ b/libvirt-gobject/libvirt-gobject-domain-disk.c
@@ -39,7 +39,7 @@ struct _GVirDomainDiskPrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirDomainDisk, gvir_domain_disk, GVIR_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirDomainDisk, gvir_domain_disk, GVIR_TYPE_DOMAIN_DEVICE);
 
 #define GVIR_DOMAIN_DISK_ERROR gvir_domain_disk_error_quark()
 
@@ -49,9 +49,8 @@ gvir_domain_disk_error_quark(void)
     return g_quark_from_static_string("gvir-domain-disk");
 }
 
-static void gvir_domain_disk_class_init(GVirDomainDiskClass *klass)
+static void gvir_domain_disk_class_init(GVirDomainDiskClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirDomainDiskPrivate));
 }
 
 static void gvir_domain_disk_init(GVirDomainDisk *self)
diff --git a/libvirt-gobject/libvirt-gobject-domain-interface.c b/libvirt-gobject/libvirt-gobject-domain-interface.c
index beae11e..f58d088 100644
--- a/libvirt-gobject/libvirt-gobject-domain-interface.c
+++ b/libvirt-gobject/libvirt-gobject-domain-interface.c
@@ -39,7 +39,7 @@ struct _GVirDomainInterfacePrivate
     gboolean unused;
 };
 
-G_DEFINE_TYPE(GVirDomainInterface, gvir_domain_interface, GVIR_TYPE_DOMAIN_DEVICE);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirDomainInterface, gvir_domain_interface, GVIR_TYPE_DOMAIN_DEVICE);
 
 #define GVIR_DOMAIN_INTERFACE_ERROR gvir_domain_interface_error_quark()
 
@@ -49,9 +49,8 @@ gvir_domain_interface_error_quark(void)
     return g_quark_from_static_string("gvir-domain-interface");
 }
 
-static void gvir_domain_interface_class_init(GVirDomainInterfaceClass *klass)
+static void gvir_domain_interface_class_init(GVirDomainInterfaceClass *klass G_GNUC_UNUSED)
 {
-    g_type_class_add_private(klass, sizeof(GVirDomainInterfacePrivate));
 }
 
 static void gvir_domain_interface_init(GVirDomainInterface *self)
diff --git a/libvirt-gobject/libvirt-gobject-domain-snapshot.c b/libvirt-gobject/libvirt-gobject-domain-snapshot.c
index 2a4338b..decdc68 100644
--- a/libvirt-gobject/libvirt-gobject-domain-snapshot.c
+++ b/libvirt-gobject/libvirt-gobject-domain-snapshot.c
@@ -38,7 +38,7 @@ struct _GVirDomainSnapshotPrivate
     virDomainSnapshotPtr handle;
 };
 
-G_DEFINE_TYPE(GVirDomainSnapshot, gvir_domain_snapshot, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirDomainSnapshot, gvir_domain_snapshot, G_TYPE_OBJECT);
 
 
 enum {
@@ -126,7 +126,6 @@ static void gvir_domain_snapshot_class_init(GVirDomainSnapshotClass *klass)
                                                        G_PARAM_CONSTRUCT_ONLY |
                                                        G_PARAM_STATIC_STRINGS));
 
-    g_type_class_add_private(klass, sizeof(GVirDomainSnapshotPrivate));
 }
 
 
diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c
index 7be936d..b522ff0 100644
--- a/libvirt-gobject/libvirt-gobject-domain.c
+++ b/libvirt-gobject/libvirt-gobject-domain.c
@@ -46,7 +46,7 @@ struct _GVirDomainPrivate
     GMutex *lock;
 };
 
-G_DEFINE_TYPE(GVirDomain, gvir_domain, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirDomain, gvir_domain, G_TYPE_OBJECT);
 
 
 enum {
@@ -247,7 +247,6 @@ static void gvir_domain_class_init(GVirDomainClass *klass)
                                         G_TYPE_NONE,
                                         0);
 
-    g_type_class_add_private(klass, sizeof(GVirDomainPrivate));
 }
 
 
diff --git a/libvirt-gobject/libvirt-gobject-input-stream.c b/libvirt-gobject/libvirt-gobject-input-stream.c
index 788e16e..2df975c 100644
--- a/libvirt-gobject/libvirt-gobject-input-stream.c
+++ b/libvirt-gobject/libvirt-gobject-input-stream.c
@@ -31,9 +31,6 @@
 #include "libvirt-gobject-input-stream.h"
 #include "libvirt-gobject-compat.h"
 
-#define gvir_input_stream_get_type _gvir_input_stream_get_type
-G_DEFINE_TYPE(GVirInputStream, gvir_input_stream, G_TYPE_INPUT_STREAM);
-
 enum
 {
     PROP_0,
@@ -50,6 +47,9 @@ struct _GVirInputStreamPrivate
     gsize count;
 };
 
+#define gvir_input_stream_get_type _gvir_input_stream_get_type
+G_DEFINE_TYPE_WITH_PRIVATE(GVirInputStream, gvir_input_stream, G_TYPE_INPUT_STREAM);
+
 static void gvir_input_stream_get_property(GObject *object,
                                            guint prop_id,
                                            GValue *value,
@@ -196,7 +196,6 @@ static void gvir_input_stream_class_init(GVirInputStreamClass *klass)
     GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
     GInputStreamClass *ginputstream_class = G_INPUT_STREAM_CLASS(klass);
 
-    g_type_class_add_private(klass, sizeof(GVirInputStreamPrivate));
 
     gobject_class->finalize = gvir_input_stream_finalize;
     gobject_class->get_property = gvir_input_stream_get_property;
diff --git a/libvirt-gobject/libvirt-gobject-interface.c b/libvirt-gobject/libvirt-gobject-interface.c
index ed7421f..1bd75bd 100644
--- a/libvirt-gobject/libvirt-gobject-interface.c
+++ b/libvirt-gobject/libvirt-gobject-interface.c
@@ -38,7 +38,7 @@ struct _GVirInterfacePrivate
     virInterfacePtr handle;
 };
 
-G_DEFINE_TYPE(GVirInterface, gvir_interface, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirInterface, gvir_interface, G_TYPE_OBJECT);
 
 
 enum {
@@ -126,7 +126,6 @@ static void gvir_interface_class_init(GVirInterfaceClass *klass)
                                                        G_PARAM_CONSTRUCT_ONLY |
                                                        G_PARAM_STATIC_STRINGS));
 
-    g_type_class_add_private(klass, sizeof(GVirInterfacePrivate));
 }
 
 
diff --git a/libvirt-gobject/libvirt-gobject-manager.c b/libvirt-gobject/libvirt-gobject-manager.c
index bbd5f84..023df53 100644
--- a/libvirt-gobject/libvirt-gobject-manager.c
+++ b/libvirt-gobject/libvirt-gobject-manager.c
@@ -39,7 +39,7 @@ struct _GVirManagerPrivate
     GList *connections;
 };
 
-G_DEFINE_TYPE(GVirManager, gvir_manager, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirManager, gvir_manager, G_TYPE_OBJECT);
 
 
 enum {
@@ -102,7 +102,6 @@ static void gvir_manager_class_init(GVirManagerClass *klass)
                  1,
                  GVIR_TYPE_CONNECTION);
 
-    g_type_class_add_private(klass, sizeof(GVirManagerPrivate));
 }
 
 
diff --git a/libvirt-gobject/libvirt-gobject-network-dhcp-lease.c b/libvirt-gobject/libvirt-gobject-network-dhcp-lease.c
index 200778d..6bed50c 100644
--- a/libvirt-gobject/libvirt-gobject-network-dhcp-lease.c
+++ b/libvirt-gobject/libvirt-gobject-network-dhcp-lease.c
@@ -46,7 +46,7 @@ struct _GVirNetworkDHCPLeasePrivate
 #endif /* HAVE_VIR_NETWORK_GET_DHCP_LEASES */
 };
 
-G_DEFINE_TYPE(GVirNetworkDHCPLease, gvir_network_dhcp_lease, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirNetworkDHCPLease, gvir_network_dhcp_lease, G_TYPE_OBJECT);
 
 enum {
     PROP_0,
@@ -124,7 +124,6 @@ static void gvir_network_dhcp_lease_class_init(GVirNetworkDHCPLeaseClass *klass)
                                                          G_PARAM_PRIVATE |
                                                          G_PARAM_STATIC_STRINGS));
 
-    g_type_class_add_private(klass, sizeof(GVirNetworkDHCPLeasePrivate));
 }
 
 
diff --git a/libvirt-gobject/libvirt-gobject-network-filter.c b/libvirt-gobject/libvirt-gobject-network-filter.c
index 7c5d6c0..d63d48a 100644
--- a/libvirt-gobject/libvirt-gobject-network-filter.c
+++ b/libvirt-gobject/libvirt-gobject-network-filter.c
@@ -39,7 +39,7 @@ struct _GVirNetworkFilterPrivate
     gchar uuid[VIR_UUID_STRING_BUFLEN];
 };
 
-G_DEFINE_TYPE(GVirNetworkFilter, gvir_network_filter, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirNetworkFilter, gvir_network_filter, G_TYPE_OBJECT);
 
 
 enum {
@@ -142,7 +142,6 @@ static void gvir_network_filter_class_init(GVirNetworkFilterClass *klass)
                                                        G_PARAM_CONSTRUCT_ONLY |
                                                        G_PARAM_STATIC_STRINGS));
 
-    g_type_class_add_private(klass, sizeof(GVirNetworkFilterPrivate));
 }
 
 
diff --git a/libvirt-gobject/libvirt-gobject-network.c b/libvirt-gobject/libvirt-gobject-network.c
index 0129a73..b607cf8 100644
--- a/libvirt-gobject/libvirt-gobject-network.c
+++ b/libvirt-gobject/libvirt-gobject-network.c
@@ -42,7 +42,7 @@ struct _GVirNetworkPrivate
     gchar uuid[VIR_UUID_STRING_BUFLEN];
 };
 
-G_DEFINE_TYPE(GVirNetwork, gvir_network, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirNetwork, gvir_network, G_TYPE_OBJECT);
 
 
 enum {
@@ -142,7 +142,6 @@ static void gvir_network_class_init(GVirNetworkClass *klass)
                                                        G_PARAM_CONSTRUCT_ONLY |
                                                        G_PARAM_STATIC_STRINGS));
 
-    g_type_class_add_private(klass, sizeof(GVirNetworkPrivate));
 }
 
 
diff --git a/libvirt-gobject/libvirt-gobject-node-device.c b/libvirt-gobject/libvirt-gobject-node-device.c
index b7b7c9e..ecc448c 100644
--- a/libvirt-gobject/libvirt-gobject-node-device.c
+++ b/libvirt-gobject/libvirt-gobject-node-device.c
@@ -38,7 +38,7 @@ struct _GVirNodeDevicePrivate
     virNodeDevicePtr handle;
 };
 
-G_DEFINE_TYPE(GVirNodeDevice, gvir_node_device, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirNodeDevice, gvir_node_device, G_TYPE_OBJECT);
 
 
 enum {
@@ -126,7 +126,6 @@ static void gvir_node_device_class_init(GVirNodeDeviceClass *klass)
                                                        G_PARAM_CONSTRUCT_ONLY |
                                                        G_PARAM_STATIC_STRINGS));
 
-    g_type_class_add_private(klass, sizeof(GVirNodeDevicePrivate));
 }
 
 
diff --git a/libvirt-gobject/libvirt-gobject-output-stream.c b/libvirt-gobject/libvirt-gobject-output-stream.c
index 97feb80..6869b4d 100644
--- a/libvirt-gobject/libvirt-gobject-output-stream.c
+++ b/libvirt-gobject/libvirt-gobject-output-stream.c
@@ -31,9 +31,6 @@
 #include "libvirt-gobject-output-stream.h"
 #include "libvirt-gobject-compat.h"
 
-#define gvir_output_stream_get_type _gvir_output_stream_get_type
-G_DEFINE_TYPE(GVirOutputStream, gvir_output_stream, G_TYPE_OUTPUT_STREAM);
-
 enum
 {
     PROP_0,
@@ -50,6 +47,9 @@ struct _GVirOutputStreamPrivate
     gsize count;
 };
 
+#define gvir_output_stream_get_type _gvir_output_stream_get_type
+G_DEFINE_TYPE_WITH_PRIVATE(GVirOutputStream, gvir_output_stream, G_TYPE_OUTPUT_STREAM);
+
 static void gvir_output_stream_get_property(GObject *object,
                                             guint prop_id,
                                             GValue *value,
@@ -196,7 +196,6 @@ static void gvir_output_stream_class_init(GVirOutputStreamClass *klass)
     GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
     GOutputStreamClass *goutputstream_class = G_OUTPUT_STREAM_CLASS(klass);
 
-    g_type_class_add_private(klass, sizeof(GVirOutputStreamPrivate));
 
     gobject_class->finalize = gvir_output_stream_finalize;
     gobject_class->get_property = gvir_output_stream_get_property;
diff --git a/libvirt-gobject/libvirt-gobject-secret.c b/libvirt-gobject/libvirt-gobject-secret.c
index bf15931..81f72b8 100644
--- a/libvirt-gobject/libvirt-gobject-secret.c
+++ b/libvirt-gobject/libvirt-gobject-secret.c
@@ -39,7 +39,7 @@ struct _GVirSecretPrivate
     gchar uuid[VIR_UUID_STRING_BUFLEN];
 };
 
-G_DEFINE_TYPE(GVirSecret, gvir_secret, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSecret, gvir_secret, G_TYPE_OBJECT);
 
 
 enum {
@@ -141,7 +141,6 @@ static void gvir_secret_class_init(GVirSecretClass *klass)
                                                        G_PARAM_CONSTRUCT_ONLY |
                                                        G_PARAM_STATIC_STRINGS));
 
-    g_type_class_add_private(klass, sizeof(GVirSecretPrivate));
 }
 
 
diff --git a/libvirt-gobject/libvirt-gobject-storage-pool.c b/libvirt-gobject/libvirt-gobject-storage-pool.c
index 227bf23..175b6f0 100644
--- a/libvirt-gobject/libvirt-gobject-storage-pool.c
+++ b/libvirt-gobject/libvirt-gobject-storage-pool.c
@@ -43,7 +43,7 @@ struct _GVirStoragePoolPrivate
     gchar uuid[VIR_UUID_STRING_BUFLEN];
 };
 
-G_DEFINE_TYPE(GVirStoragePool, gvir_storage_pool, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirStoragePool, gvir_storage_pool, G_TYPE_OBJECT);
 
 
 enum {
@@ -153,7 +153,6 @@ static void gvir_storage_pool_class_init(GVirStoragePoolClass *klass)
                                                        G_PARAM_STATIC_STRINGS));
 
 
-    g_type_class_add_private(klass, sizeof(GVirStoragePoolPrivate));
 }
 
 
diff --git a/libvirt-gobject/libvirt-gobject-storage-vol.c b/libvirt-gobject/libvirt-gobject-storage-vol.c
index 18aa8b3..2a9c67f 100644
--- a/libvirt-gobject/libvirt-gobject-storage-vol.c
+++ b/libvirt-gobject/libvirt-gobject-storage-vol.c
@@ -41,7 +41,7 @@ struct _GVirStorageVolPrivate
     GVirStoragePool *pool;
 };
 
-G_DEFINE_TYPE(GVirStorageVol, gvir_storage_vol, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirStorageVol, gvir_storage_vol, G_TYPE_OBJECT);
 
 
 enum {
@@ -148,7 +148,6 @@ static void gvir_storage_vol_class_init(GVirStorageVolClass *klass)
                                                         G_PARAM_CONSTRUCT_ONLY |
                                                         G_PARAM_STATIC_STRINGS));
 
-    g_type_class_add_private(klass, sizeof(GVirStorageVolPrivate));
 }
 
 
diff --git a/libvirt-gobject/libvirt-gobject-stream.c b/libvirt-gobject/libvirt-gobject-stream.c
index a518a19..c175353 100644
--- a/libvirt-gobject/libvirt-gobject-stream.c
+++ b/libvirt-gobject/libvirt-gobject-stream.c
@@ -58,7 +58,7 @@ typedef struct {
 } GVirStreamSource;
 
 
-G_DEFINE_TYPE(GVirStream, gvir_stream, G_TYPE_IO_STREAM);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirStream, gvir_stream, G_TYPE_IO_STREAM);
 
 
 enum {
@@ -279,7 +279,6 @@ static void gvir_stream_class_init(GVirStreamClass *klass)
                                                        G_PARAM_CONSTRUCT_ONLY |
                                                        G_PARAM_STATIC_STRINGS));
 
-    g_type_class_add_private(klass, sizeof(GVirStreamPrivate));
 }
 
 
-- 
2.16.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux