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

Eric Blake eblake at redhat.com
Thu Jan 19 20:16:01 UTC 2012


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.

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?

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120119/2e90e8d2/attachment-0001.sig>


More information about the libvir-list mailing list