No review, just a short note.

Marc-André Lureau <marcandre.lur...@redhat.com> writes:

> Wherever a struct/union/alternate/command/event member with NAME: TYPE
> form is accepted, desugar it to a NAME: { 'type': TYPE } form.
>
> This will allow to add new member details, such as 'if' in the
> following patch to introduce conditionals, or 'default' for default
> values etc.
>
> Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>
> ---
[...]
> diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py
> index 9eb2b0cc37..3f46ed5530 100644
> --- a/scripts/qapi/common.py
> +++ b/scripts/qapi/common.py
[...]
> @@ -952,6 +967,10 @@ def check_exprs(exprs):
>          info = expr_elem['info']
>          if 'enum' in expr:
>              normalize_enum(expr, info)
> +        elif 'union' in expr:
> +            normalize_members(expr, 'base')
> +        if {'union', 'alternate', 'struct', 'command', 'event'} & set(expr):
> +            normalize_members(expr, 'data')

You've since changed this to

  +        if set(['union', 'alternate', 'struct', 'command', 'event']) & 
set(expr):
  +            normalize_members(expr, 'data')

in your git branch.

>  
>      # Learn the types and check for valid expression keys
>      for expr_elem in exprs:
[...]

Reply via email to