qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Wenchao Xia <wenchaoqemu@gmail.com>, qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com, kwolf@redhat.com,
	Wenchao Xia <xiawenc@linux.vnet.ibm.com>,
	armbru@redhat.com, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH V8 04/10] qapi script: check correctness of union
Date: Thu, 27 Feb 2014 12:21:15 -0700	[thread overview]
Message-ID: <530F902B.3010609@redhat.com> (raw)
In-Reply-To: <1393499376-4374-5-git-send-email-wenchaoqemu@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2464 bytes --]

On 02/27/2014 04:09 AM, Wenchao Xia wrote:
> From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
> 
> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
> Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>

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):
    <xiawenc@linux.ibm.com>
TCVM.MEGACENTER.DE.IBM.COM received negative reply:
550 5.1.1 <xiawenc@linux.ibm.com>: 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2014-02-27 19:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27 11:09 [Qemu-devel] [PATCH V8 00/10] qapi script: support enum as discriminator and better enum name Wenchao Xia
2014-02-27 11:09 ` [Qemu-devel] [PATCH V8 01/10] qapi script: remember explicitly defined enum values Wenchao Xia
2014-02-27 13:45   ` Eric Blake
2014-02-27 11:09 ` [Qemu-devel] [PATCH V8 02/10] qapi script: add check for duplicated key Wenchao Xia
2014-02-27 15:41   ` Eric Blake
2014-02-27 11:09 ` [Qemu-devel] [PATCH V8 03/10] qapi script: remember line number in schema parsing Wenchao Xia
2014-02-27 18:03   ` Eric Blake
2014-02-27 11:09 ` [Qemu-devel] [PATCH V8 04/10] qapi script: check correctness of union Wenchao Xia
2014-02-27 19:21   ` Eric Blake [this message]
2014-02-28 23:19     ` Wenchao Xia
2014-03-04 12:47   ` Markus Armbruster
2014-03-04 14:54     ` Wenchao Xia
2014-02-27 11:09 ` [Qemu-devel] [PATCH V8 05/10] qapi script: code move for generate_enum_name() Wenchao Xia
2014-02-27 11:09 ` [Qemu-devel] [PATCH V8 06/10] qapi script: use same function to generate enum string Wenchao Xia
2014-02-27 20:12   ` Eric Blake
2014-02-27 11:09 ` [Qemu-devel] [PATCH V8 07/10] qapi script: support enum type as discriminator in union Wenchao Xia
2014-02-27 21:27   ` Eric Blake
2014-02-27 11:09 ` [Qemu-devel] [PATCH V8 08/10] qapi: convert BlockdevOptions to use enum discriminator Wenchao Xia
2014-02-27 21:54   ` Eric Blake
2014-02-27 11:09 ` [Qemu-devel] [PATCH V8 09/10] qapi script: do not allow string discriminator Wenchao Xia
2014-02-27 22:05   ` Eric Blake
2014-02-27 11:09 ` [Qemu-devel] [PATCH V8 10/10] qapi script: do not add "_" for every capitalized char in enum Wenchao Xia
2014-02-28 23:25 ` [Qemu-devel] [PATCH V8 00/10] qapi script: support enum as discriminator and better enum name Wenchao Xia
2014-03-01  7:09   ` Markus Armbruster
2014-03-04 13:03 ` Markus Armbruster
2014-03-04 13:35   ` Luiz Capitulino
2014-03-04 13:53     ` Markus Armbruster
2014-03-04 14:55       ` Wenchao Xia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=530F902B.3010609@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wenchaoqemu@gmail.com \
    --cc=xiawenc@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).