[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: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH V2] qapi: Let redundant includes be skipped excepted the first occurrence. |
Date: |
Mon, 12 May 2014 11:11:41 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
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
signature.asc
Description: OpenPGP digital signature