Re: [PATCHv2 4/6] util: add new file for virTypedParameter utils

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

 



On Thu, Jan 19, 2012 at 01:16:01PM -0700, Eric Blake wrote:
> On 01/19/2012 12:01 PM, Daniel P. Berrange wrote:
> >> +
> >> +VIR_ENUM_DECL(virTypedParameter)
> >> +VIR_ENUM_IMPL(virTypedParameter, VIR_TYPED_PARAM_STRING + 1,
> > 
> > I'm slowly coming to the view that we should juust add "_LAST" to
> > every single one of our public enums.
> > 
> > But perhaps have them disabled by default, unless the app developer
> > does
> > 
> >   #define LIBVIRT_ENUM_SENTINALS
> > 
> > before including libvirt.h, so they make a concious decision to use a
> > enum value known to change.
> 
> Sounds like an interesting idea, but I'll save it for a followup.

Sure, no problem.

> Would it be acceptable to protect existing _LAST values when adding all
> the new ones, or must we keep those unconditionally defined to avoid
> breaking compilation of anyone that was using them?

I think we could get away with protecting existing ones too, since
apps can easily just add the #define, even when building with older
libvirt and it'll be harmless

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]