All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Benoît Canet" <benoit.canet@irqsave.net>, qemu-devel@nongnu.org
Cc: armbru@redhat.com, Benoit Canet <benoit@irqsave.net>,
	vilanova@ac.upc.edu, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4] qapi: skip redundant includes
Date: Fri, 16 May 2014 06:02:18 -0600	[thread overview]
Message-ID: <5375FE4A.1010807@redhat.com> (raw)
In-Reply-To: <1400237516-15048-2-git-send-email-benoit.canet@irqsave.net>

[-- Attachment #1: Type: text/plain, Size: 1190 bytes --]

On 05/16/2014 04:51 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 <benoit@irqsave.net>
> ---
>  docs/qapi-code-gen.txt                        |  2 +-

Looks like the only addition.

> +++ b/docs/qapi-code-gen.txt
> @@ -48,7 +48,7 @@ The QAPI schema definitions can be modularized using the 'include' directive:
>   { 'include': 'path/to/file.json'}
>  
>  The directive is evaluated recursively, and include paths are relative to the
> -file using the directive.
> +file using the directive. Multiple includes of the same file are safe.

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2014-05-16 12:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16 10:51 [Qemu-devel] [PATCH v4] Let the C generated bits of QAPI be generated only once when identical includes are done Benoît Canet
2014-05-16 10:51 ` [Qemu-devel] [PATCH v4] qapi: skip redundant includes Benoît Canet
2014-05-16 12:02   ` Eric Blake [this message]
2014-05-16 14:44 ` [Qemu-devel] [PATCH v4] Let the C generated bits of QAPI be generated only once when identical includes are done Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5375FE4A.1010807@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=benoit.canet@irqsave.net \
    --cc=benoit@irqsave.net \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vilanova@ac.upc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.