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 > --- > 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