qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V8 04/10] qapi script: check correctness of unio


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH V8 04/10] qapi script: check correctness of union
Date: Thu, 27 Feb 2014 12:21:15 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 02/27/2014 04:09 AM, Wenchao Xia wrote:
> From: Wenchao Xia <address@hidden>
> 
> Signed-off-by: Wenchao Xia <address@hidden>
> Signed-off-by: Wenchao Xia <address@hidden>

Double-S-o-B. I've also noticed that I'm getting undeliverable mail
rejections from your linux.vnet.ibm.com address:

TCVM.MEGACENTER.DE.IBM.COM unable to deliver following mail to recipient(s):
    <address@hidden>
TCVM.MEGACENTER.DE.IBM.COM received negative reply:
550 5.1.1 <address@hidden>: Recipient address rejected: User
unknown in local recipient table

> ---
>  scripts/qapi.py                                    |  106 
> +++++++++++++++++++-
>  tests/Makefile                                     |    4 +-

> diff --git a/scripts/qapi.py b/scripts/qapi.py
> index 1954292..cea346f 100644
> --- a/scripts/qapi.py
> +++ b/scripts/qapi.py
> @@ -50,6 +50,15 @@ class QAPISchemaError(Exception):
>      def __str__(self):
>          return "%s:%s:%s: %s" % (self.fp.name, self.line, self.col, self.msg)
>  
> +class QAPIExprError(Exception):
> +    def __init__(self, expr_info, msg):
> +        self.fp = expr_info['fp']
> +        self.line = expr_info['line']
> +        self.msg = msg
> +
> +    def __str__(self):
> +        return "%s:%s: %s" % (self.fp.name, self.line, self.msg)
> +
>  class QAPISchema:
>  
>      def __init__(self, fp):
> @@ -64,7 +73,10 @@ class QAPISchema:
>          self.accept()
>  
>          while self.tok != None:
> -            self.exprs.append(self.get_expr(False))
> +            expr_info = {'fp': fp, 'line': self.line}
> +            expr_elem = {'expr': self.get_expr(False),
> +                         'info': expr_info}
> +            self.exprs.append(expr_elem)

Should these two hunks be part of 3/10?  Or at least as a separate
patch? Or at least mentioned in the commit message?

> @@ -162,6 +174,89 @@ class QAPISchema:
>              raise QAPISchemaError(self, 'Expected "{", "[" or string')
>          return expr
>  
> +def find_base_fields(base):
> +    base_struct_define = find_struct(base)
> +    if not base_struct_define:
> +        return None
> +    return base_struct_define['data']
> +
> +# Return the discriminator enum define if discrminator is specified as an

s/discrminator/discriminator/


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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]