Re: [libvirt-glib] gobject: Remove redundant virtual functions

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

 



On Fri, Jul 03, 2015 at 04:43:15PM +0100, Zeeshan Ali (Khattak) wrote:
> On Fri, Jul 3, 2015 at 3:35 PM, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote:
> > On Fri, Jul 03, 2015 at 03:17:42PM +0100, Zeeshan Ali (Khattak) wrote:
> >> These virtual functions were most likely a result of copy&paste error.
> >> ---
> >>  libvirt-gobject/libvirt-gobject-network.h | 5 +----
> >>  1 file changed, 1 insertion(+), 4 deletions(-)
> >>
> >> diff --git a/libvirt-gobject/libvirt-gobject-network.h b/libvirt-gobject/libvirt-gobject-network.h
> >> index 5617ed6..8c31af4 100644
> >> --- a/libvirt-gobject/libvirt-gobject-network.h
> >> +++ b/libvirt-gobject/libvirt-gobject-network.h
> >> @@ -55,10 +55,7 @@ struct _GVirNetworkClass
> >>  {
> >>      GObjectClass parent_class;
> >>
> >> -    void (*started)(GVirNetwork *net);
> >> -    void (*stopped)(GVirNetwork *net);
> >> -
> >> -    gpointer padding[20];
> >> +    gpointer padding[22];
> >>  };
> >
> > Although you maintained the struct size ABI, this is still technically
> > an API incompatible change / break.
> >
> > FWIW this is equivalent the the same named slots in the domain class,
> > where they are used for signals. It seems we never wired up the signals
> > in the network class though, hence why they may appear uneccessary. So
> > I think we shouldn't remove them, but instead add the use by signals
> > as we have for other classes
> 
> Ah they do apply to network as well. Didn't realize that. BTW, virtual
> functions are no longer needed/recommended for signals.

If they're no longer needed, then perhaps just put a comment next to
these two fields mentioning they are unused, rather than deleting
them.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

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