On 02/11/2014 01:32 AM, Markus Armbruster wrote: > Eric Blake <ebl...@redhat.com> writes:
>> >> Hmm, right now, the ChardevBackend union pre-dates when we added flat >> unions. For flat unions, we can set a discriminator to be an enum type >> [1], at which point the code generator then validates that we cover all >> values of the enum in branches of the union; maybe it's worth >> retro-fitting simple unions to also take advantage of the additional >> coverage of the discriminator being an enum. > > Yes, and Wenchao Xia has been working towards that: "[PATCH V5 00/10] > qapi script: support enum as discriminator and better enum name". > >> [1] actually, did those patches ever get applied, and we just missed >> documenting it in qapi-code-gen.txt, or are they still pending review? > > By "those", do you mean Wenchao Xia's patches? Maybe my [1] to tie together two widely separated paragraphs wasn't obvious, but yes, I meant Wenchao's tests. Plus they just got reposted: https://lists.gnu.org/archive/html/qemu-devel/2014-02/msg01706.html -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature