From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkajN-00043p-8F for qemu-devel@nongnu.org; Wed, 14 May 2014 11:04:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkajI-0001Nj-Pc for qemu-devel@nongnu.org; Wed, 14 May 2014 11:04:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkajI-0001Na-HZ for qemu-devel@nongnu.org; Wed, 14 May 2014 11:04:24 -0400 Message-ID: <537385EE.8080004@redhat.com> Date: Wed, 14 May 2014 09:04:14 -0600 From: Eric Blake MIME-Version: 1.0 References: <1400076469-5914-1-git-send-email-benoit.canet@irqsave.net> <1400076469-5914-2-git-send-email-benoit.canet@irqsave.net> In-Reply-To: <1400076469-5914-2-git-send-email-benoit.canet@irqsave.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6VDuVP7alS47DmFI0QH4qBNjU49r5OLEq" Subject: Re: [Qemu-devel] [PATCH v3] qapi: skip redundant includes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , qemu-devel@nongnu.org Cc: armbru@redhat.com, Benoit Canet , vilanova@ac.upc.edu, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6VDuVP7alS47DmFI0QH4qBNjU49r5OLEq Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/14/2014 08:07 AM, Beno=C3=AEt 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. >=20 > 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. >=20 > 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 >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --6VDuVP7alS47DmFI0QH4qBNjU49r5OLEq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTc4XuAAoJEKeha0olJ0NqzBcH/3E9ojIXMo5M76aqLWoebjeR L/hamPaUrqh9eW2nj2hRlYgNb7tYwfhxwFMBfEd2d6HkCqw60r5I1IbBPeszXEr+ zVxwtfoqFDXy1v71JHKoAIWnzFujqMahfZNZqrsKLmcRwGuqf92R7VxZm6JDYnUR LN1RWyBixGVagxUeqSVj4M5iYad9W2mvl7mdp6zhhgk5l9CZphg0xSDBnQvPrwWc CLcnEFSxJo8zbEth9D1y3Mdy2gsMxz4OGsodY8vpdBOs/HkDg8OBrRJNatyOymMn JE5vd8nQNTB4ysmHqA4QXanGAo7fLqvM/TRSREA7orZvOmMbkDDBWkO3jTiFxnk= =t5FD -----END PGP SIGNATURE----- --6VDuVP7alS47DmFI0QH4qBNjU49r5OLEq--