From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 1/2] qapi: change QmpOutputVisitor to QSLIST
Date: Thu, 07 Jul 2016 18:28:25 +0200 [thread overview]
Message-ID: <87twg1fm52.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <1467906798-5312-2-git-send-email-pbonzini@redhat.com> (Paolo Bonzini's message of "Thu, 7 Jul 2016 17:53:17 +0200")
Paolo Bonzini <pbonzini@redhat.com> writes:
> This saves a little memory compared to the doubly-linked QTAILQ.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> qapi/qmp-output-visitor.c | 24 +++++++++++-------------
> 1 file changed, 11 insertions(+), 13 deletions(-)
>
> diff --git a/qapi/qmp-output-visitor.c b/qapi/qmp-output-visitor.c
> index 0452056..64aa42c 100644
> --- a/qapi/qmp-output-visitor.c
> +++ b/qapi/qmp-output-visitor.c
> @@ -23,15 +23,13 @@ typedef struct QStackEntry
> {
> QObject *value;
> void *qapi; /* sanity check that caller uses same pointer */
> - QTAILQ_ENTRY(QStackEntry) node;
> + QSLIST_ENTRY(QStackEntry) node;
> } QStackEntry;
>
> -typedef QTAILQ_HEAD(QStack, QStackEntry) QStack;
> -
> struct QmpOutputVisitor
> {
> Visitor visitor;
> - QStack stack; /* Stack of containers that haven't yet been finished */
> + QSLIST_HEAD(, QStackEntry) stack; /* Stack of containers that haven't yet been finished */
Long line. I'll squash in Eric's proposed fix on commit if you don't
mind:
QSLIST_HEAD(...); /* Stack of unfinished containers */
> QObject *root; /* Root of the output visit */
> QObject **result; /* User's storage location for result */
> };
[...]
next prev parent reply other threads:[~2016-07-07 16:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-07 15:53 [Qemu-devel] [PATCH v3 0/2] qapi: change QObject visitors to QSLIST Paolo Bonzini
2016-07-07 15:53 ` [Qemu-devel] [PATCH v3 1/2] qapi: change QmpOutputVisitor " Paolo Bonzini
2016-07-07 16:28 ` Markus Armbruster [this message]
2016-07-07 16:44 ` Paolo Bonzini
2016-07-08 6:56 ` Markus Armbruster
2016-07-07 15:53 ` [Qemu-devel] [PATCH v3 2/2] qapi: change QmpInputVisitor " Paolo Bonzini
2016-07-07 18:30 ` Eric Blake
2016-07-07 16:29 ` [Qemu-devel] [PATCH v3 0/2] qapi: change QObject visitors " Markus Armbruster
2016-07-08 7:24 ` Markus Armbruster
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=87twg1fm52.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.