[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2] qapi: Let redundant includes be skipped exce
From: |
Benoît Canet |
Subject: |
Re: [Qemu-devel] [PATCH V2] qapi: Let redundant includes be skipped excepted the first occurrence. |
Date: |
Wed, 14 May 2014 16:04:35 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
The Monday 12 May 2014 à 11:11:41 (-0600), Eric Blake wrote :
> On 05/09/2014 09:48 AM, Benoît Canet wrote:
>
> Subject line has problems. 'excepted' is not a word, and you are already
> asked to avoid trailing '.'. I suggest a much simpler:
>
> qapi: skip redundant includes
>
> > The purpose of this change is to help create a json file containing
> > common definitions; each bit of generated C code must be spitted
>
> s/spitted/emitted/
>
> > only one time.
> >
> > A second history global to all QAPISchema instances has been added
> > to detect when a file is included more than one time and skip these
> > includes.
> > It does not act as a stack and the changes made to it by the
> > __init__ function are propagated back to the caller so it's really
> > a global state.
> >
> > Signed-off-by: Benoit Canet <address@hidden>
> > ---
>
> > index 0000000..573541a
> > --- /dev/null
> > +++ b/tests/qapi-schema/include-only-one-time.exit
> > @@ -0,0 +1 @@
> > +0
> > diff --git a/tests/qapi-schema/include-only-one-time.json
> > b/tests/qapi-schema/include-only-one-time.json
> > new file mode 100644
> > index 0000000..11772e3
> > --- /dev/null
> > +++ b/tests/qapi-schema/include-only-one-time.json
>
> Long name; you could get by with:
>
> tests/qapi-schema/include-repetition.json
>
> > @@ -0,0 +1,3 @@
> > +{ 'include': 'comments.json' }
> > +{ 'include': 'sub-include-only-one-time.json' }
>
> This naming doesn't preserve the 'include-' prefix used by all other
> files related to include. Maybe:
>
> { 'include': 'include-repetition-sub.json' }
>
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
Thanks for the review I'll iterate.