On 05/14/2014 08:07 AM, BenoƮt Canet wrote: > The purpose of this change is to help create a json file containing > common definitions; each bit of generated C code must be 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 > --- > scripts/qapi.py | 14 +++++++++++--- > tests/Makefile | 3 ++- > tests/qapi-schema/include-repetition-sub.json | 2 ++ > tests/qapi-schema/include-repetition.err | 0 > tests/qapi-schema/include-repetition.exit | 1 + > tests/qapi-schema/include-repetition.json | 3 +++ > tests/qapi-schema/include-repetition.out | 3 +++ > 7 files changed, 22 insertions(+), 4 deletions(-) > create mode 100644 tests/qapi-schema/include-repetition-sub.json > create mode 100644 tests/qapi-schema/include-repetition.err > create mode 100644 tests/qapi-schema/include-repetition.exit > create mode 100644 tests/qapi-schema/include-repetition.json > create mode 100644 tests/qapi-schema/include-repetition.out > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org