[libvirt-glib] Fix GVirConfigDomainTimerPit parent class/object

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

 



GVirConfigDomainTimerPit is correctly define as inheriting from
GVirConfigDomainTimer in the G_DEFINE_TYPE macro, but it only
embeds GVirConfigObject/GVirConfigObjectClass structs.

This is an ABI break as this changes the size of the
GVirConfigDomainTimerPit/GVirConfigDomainTimerPitClass structs
However, since these structs only have non-public members, users of the
library will not be trying to access fields of the struct past the first
field (which is the one which changed size). This would also be an issue
if anything had subclassed GVirConfigDomainTimerPit, which is unlikely at
this point.
All in all, it's imo more convenient to silently fix this without an soname
bump. I've tested that GNOME Boxes built with an older version of
libvirt-gconfig still generates the correct GVirConfigDomainTimerPit
elements when using a version of libvirt-gconfig with this patch.
---
 libvirt-gconfig/libvirt-gconfig-domain-timer-pit.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libvirt-gconfig/libvirt-gconfig-domain-timer-pit.h b/libvirt-gconfig/libvirt-gconfig-domain-timer-pit.h
index b644c52..7802ac4 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-timer-pit.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-timer-pit.h
@@ -42,7 +42,7 @@ typedef struct _GVirConfigDomainTimerPitClass GVirConfigDomainTimerPitClass;
 
 struct _GVirConfigDomainTimerPit
 {
-    GVirConfigObject parent;
+    GVirConfigDomainTimer parent;
 
     GVirConfigDomainTimerPitPrivate *priv;
 
@@ -51,7 +51,7 @@ struct _GVirConfigDomainTimerPit
 
 struct _GVirConfigDomainTimerPitClass
 {
-    GVirConfigObjectClass parent_class;
+    GVirConfigDomainTimerClass parent_class;
 
     gpointer padding[20];
 };
-- 
1.8.4.2

--
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]