Re: [Qemu-devel] [PATCH RFC v2 30/47] qapi: De-duplicate enum code generation

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> Duplicated in commit 21cd70d. Yes, we can't import qapi-types, but >> that's no excuse. Move the helpers from qapi-types.py to qapi.py, and >> replace the duplicates in qapi-event.py. >> >> The generated event enumeration

Re: [Qemu-devel] [PATCH RFC v2 30/47] qapi: De-duplicate enum code generation

2015-07-23 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > Duplicated in commit 21cd70d. Yes, we can't import qapi-types, but > that's no excuse. Move the helpers from qapi-types.py to qapi.py, and > replace the duplicates in qapi-event.py. > > The generated event enumeration type gains a _MAX member,

[Qemu-devel] [PATCH RFC v2 30/47] qapi: De-duplicate enum code generation

2015-07-01 Thread Markus Armbruster
Duplicated in commit 21cd70d. Yes, we can't import qapi-types, but that's no excuse. Move the helpers from qapi-types.py to qapi.py, and replace the duplicates in qapi-event.py. The generated event enumeration type gains a _MAX member, and its lookup table becomes const-correct (see commit 2e445