From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, el13635@mail.ntua.gr
Subject: Re: [Qemu-devel] [PATCH 2/2] vl: Partial support for non-scalar properties with -object
Date: Thu, 10 Aug 2017 18:38:32 +0200 [thread overview]
Message-ID: <e373532b-3c09-f893-1e9a-e40e4e82866a@redhat.com> (raw)
In-Reply-To: <87efsj8jn5.fsf@dusky.pond.sub.org>
On 10/08/2017 18:36, Markus Armbruster wrote:
>>> + while (!QSIMPLEQ_EMPTY(&oo_queue)) {
>>> + ObjectOptionsQueueEntry *e = QSIMPLEQ_FIRST(&oo_queue);
>>> +
>>> + QSIMPLEQ_REMOVE_HEAD(&oo_queue, entry);
>>> + qapi_free_ObjectOptions(e->oo);
>>> + g_free(e);
>>> + }
>> Why not free the queue entry in object_create, and assert here that it's
>> empty?
>
> Assumes object_create_delayed(TYPE) == !object_create_initial(TYPE),
> which is the case. Fewer assumptions is good. Less code is also good.
> Pick your goodness, please :)
I think the assumption is not that object_create_delayed(TYPE) ==
!object_create_initial(TYPE), but rather that all -object options are
dealt with (and they shouldn't be dealt more than once). It's a
reasonable assumption, methinks. :)
Paolo
next prev parent reply other threads:[~2017-08-10 16:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 12:25 [Qemu-devel] [PATCH 0/2] vl: Partial support for non-scalar properties with -object Markus Armbruster
2017-08-10 12:25 ` [Qemu-devel] [PATCH 1/2] vl: Factor object_create() out of main() Markus Armbruster
2017-08-10 14:43 ` Eric Blake
2017-08-10 16:28 ` Markus Armbruster
2017-08-11 3:33 ` Philippe Mathieu-Daudé
2017-08-10 12:25 ` [Qemu-devel] [PATCH 2/2] vl: Partial support for non-scalar properties with -object Markus Armbruster
2017-08-10 14:59 ` Eric Blake
2017-08-10 16:33 ` Markus Armbruster
2017-08-10 15:02 ` Paolo Bonzini
2017-08-10 16:36 ` Markus Armbruster
2017-08-10 16:38 ` Paolo Bonzini [this message]
2017-08-11 6:20 ` 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=e373532b-3c09-f893-1e9a-e40e4e82866a@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=el13635@mail.ntua.gr \
--cc=kwolf@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).