The API has been deprecated, which causes build failures
on Fedora Rawhide; use the G_DEFINE_TYPE_WITH_PRIVATE()
macro instead.
This requires bumping the minimum GLib version to 2.38.
Signed-off-by: Andrea Bolognani
---
configure.ac | 2 +-
libvirt-sandbox/libvirt-sandbox-builder-container.c | 4 +---
libvirt-sandbox/libvirt-sandbox-builder-initrd.c | 4 +---
libvirt-sandbox/libvirt-sandbox-builder-machine.c| 4 +---
libvirt-sandbox/libvirt-sandbox-builder.c| 4 +---
libvirt-sandbox/libvirt-sandbox-config-disk.c| 4 +---
libvirt-sandbox/libvirt-sandbox-config-initrd.c | 4 +---
libvirt-sandbox/libvirt-sandbox-config-interactive.c | 4 +---
libvirt-sandbox/libvirt-sandbox-config-mount-file.c | 4 +---
libvirt-sandbox/libvirt-sandbox-config-mount-guest-bind.c| 5 ++---
libvirt-sandbox/libvirt-sandbox-config-mount-host-bind.c | 5 ++---
libvirt-sandbox/libvirt-sandbox-config-mount-host-image.c| 4 +---
libvirt-sandbox/libvirt-sandbox-config-mount-ram.c | 4 +---
libvirt-sandbox/libvirt-sandbox-config-mount.c | 4 +---
libvirt-sandbox/libvirt-sandbox-config-network-address.c | 4 +---
.../libvirt-sandbox-config-network-filterref-parameter.c | 4 +---
libvirt-sandbox/libvirt-sandbox-config-network-filterref.c | 4 +---
libvirt-sandbox/libvirt-sandbox-config-network-route.c | 4 +---
libvirt-sandbox/libvirt-sandbox-config-network.c | 4 +---
libvirt-sandbox/libvirt-sandbox-config-service-generic.c | 4 +---
libvirt-sandbox/libvirt-sandbox-config-service-systemd.c | 4 +---
libvirt-sandbox/libvirt-sandbox-config-service.c | 4 +---
libvirt-sandbox/libvirt-sandbox-config.c | 4 +---
libvirt-sandbox/libvirt-sandbox-console-raw.c| 4 +---
libvirt-sandbox/libvirt-sandbox-console-rpc.c| 4 +---
libvirt-sandbox/libvirt-sandbox-console.c| 4 +---
libvirt-sandbox/libvirt-sandbox-context-interactive.c| 4 +---
libvirt-sandbox/libvirt-sandbox-context-service.c| 4 +---
libvirt-sandbox/libvirt-sandbox-context.c| 4 +---
29 files changed, 31 insertions(+), 85 deletions(-)
diff --git a/configure.ac b/configure.ac
index d2e2636..42b6538 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,7 @@ AC_CANONICAL_HOST
AM_SILENT_RULES([yes])
-GLIB_REQUIRED=2.32.0
+GLIB_REQUIRED=2.38.0
LIBVIRT_REQUIRED=1.0.2
LIBVIRT_GCONFIG_REQUIRED=0.2.1
LIBVIRT_GLIB_REQUIRED=0.2.2
diff --git a/libvirt-sandbox/libvirt-sandbox-builder-container.c
b/libvirt-sandbox/libvirt-sandbox-builder-container.c
index 66e1fc6..a4b00e3 100644
--- a/libvirt-sandbox/libvirt-sandbox-builder-container.c
+++ b/libvirt-sandbox/libvirt-sandbox-builder-container.c
@@ -48,7 +48,7 @@ struct _GVirSandboxBuilderContainerPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirSandboxBuilderContainer, gvir_sandbox_builder_container,
GVIR_SANDBOX_TYPE_BUILDER);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxBuilderContainer,
gvir_sandbox_builder_container, GVIR_SANDBOX_TYPE_BUILDER);
enum {
@@ -473,8 +473,6 @@ static void
gvir_sandbox_builder_container_class_init(GVirSandboxBuilderContaine
builder_class->construct_devices =
gvir_sandbox_builder_container_construct_devices;
builder_class->get_disk_prefix =
gvir_sandbox_builder_container_get_disk_prefix;
builder_class->get_files_to_copy =
gvir_sandbox_builder_container_get_files_to_copy;
-
-g_type_class_add_private(klass,
sizeof(GVirSandboxBuilderContainerPrivate));
}
diff --git a/libvirt-sandbox/libvirt-sandbox-builder-initrd.c
b/libvirt-sandbox/libvirt-sandbox-builder-initrd.c
index 59a03e6..a550d4c 100644
--- a/libvirt-sandbox/libvirt-sandbox-builder-initrd.c
+++ b/libvirt-sandbox/libvirt-sandbox-builder-initrd.c
@@ -51,7 +51,7 @@ struct _GVirSandboxBuilderInitrdPrivate
gboolean unused;
};
-G_DEFINE_TYPE(GVirSandboxBuilderInitrd, gvir_sandbox_builder_initrd,
G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GVirSandboxBuilderInitrd,
gvir_sandbox_builder_initrd, G_TYPE_OBJECT);
enum {
@@ -127,8 +127,6 @@ static void
gvir_sandbox_builder_initrd_class_init(GVirSandboxBuilderInitrdClass
object_class->finalize = gvir_sandbox_builder_initrd_finalize;
object_class->get_property = gvir_sandbox_builder_initrd_get_property;
object_class->set_property = gvir_sandbox_builder_initrd_set_property;
-
-g_type_class_add_private(klass, sizeof(GVirSandboxBuilderInitrdPrivate));
}
diff --git a/libvirt-sandbox/libvirt-sandbox-builder-machine.c
b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
index b6f2218..a4a5dcd 100644
--- a/libvirt-sandbox/libvirt-sandbox-builder-machine.c
+++ b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
@@ -50,7 +50,7 @@ struct _GVirSandboxBuilderMachinePrivate
gboolean unused;
};
-G_DEFINE_TYPE