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