On 03/13/2017 01:18 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster <arm...@redhat.com> > --- > scripts/qapi.py | 24 +++++++++--------------- > 1 file changed, 9 insertions(+), 15 deletions(-) >
Reviewed-by: Eric Blake <ebl...@redhat.com> > def add_enum(definition, info): > global enum_types > - name = definition['enum'] > - add_name(name, info, 'enum', 'data' not in definition) Here, we were passing a potential True for the 'implicit' parameter... > + name = expr[meta] > + add_name(name, info, meta) ...here, we always pass False, but that's okay (an explicit enum always has 'data'), > if doc and doc.symbol != name: > raise QAPISemError(info, "Definition of '%s' follows > documentation" > " for '%s'" % (name, doc.symbol)) > @@ -974,6 +967,7 @@ def check_exprs(exprs): > else: > continue > add_enum({ 'enum': name }, expr_elem['info']) > + add_name(name, info, 'enum', implicit=True) ...and here is the only place that was getting implicit=True. Took me a while to see it, but the refactoring is sane. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature