From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: peter.crosthwaite@xilinx.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification"
Date: Wed, 12 Nov 2014 18:13:08 +0100 [thread overview]
Message-ID: <54639524.3060205@redhat.com> (raw)
In-Reply-To: <1415812130-2592-1-git-send-email-armbru@redhat.com>
On 12/11/2014 18:08, Markus Armbruster wrote:
> "Automatic arrayification" is a convenience feature for creating a
> bunch of properties with a common type, accessors and so forth, named
> in a peculiar way: "foo[0]", "foo[1]", ... It's implemented by making
> property names ending with "[*]" magical. The magic is uncalled for,
> as names can be just as well generated separately from adding
> properties.
>
> See also
> https://lists.nongnu.org/archive/html/qemu-devel/2014-10/msg00623.html
I dislike having the caller free the property name. It is decent as you
used it here, but it won't be usable if we later try and avoid making
all memory region names array-ified.
I like the idea, but the API is just too ugly. :( Unfortunately I have
nothing better to propose.
Paolo
> Markus Armbruster (4):
> qom: New object_gen_new_property_name()
> memory: Use object_gen_new_property_name() instead of "arrayification"
> qdev: Use object_gen_new_property_name() instead of "arrayification"
> Revert "qom: Add automatic arrayification to object_property_add()"
>
> hw/core/qdev.c | 18 ++++++++++++------
> include/qom/object.h | 8 ++++++++
> memory.c | 6 +++---
> qom/object.c | 35 ++++++++++++++---------------------
> 4 files changed, 37 insertions(+), 30 deletions(-)
>
next prev parent reply other threads:[~2014-11-12 17:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-12 17:08 [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification" Markus Armbruster
2014-11-12 17:08 ` [Qemu-devel] [PATCH 1/4] qom: New object_gen_new_property_name() Markus Armbruster
2014-11-12 17:08 ` [Qemu-devel] [PATCH 2/4] memory: Use object_gen_new_property_name() instead of "arrayification" Markus Armbruster
2014-11-12 17:08 ` [Qemu-devel] [PATCH 3/4] qdev: " Markus Armbruster
2014-11-12 17:08 ` [Qemu-devel] [PATCH 4/4] Revert "qom: Add automatic arrayification to object_property_add()" Markus Armbruster
2014-11-12 17:14 ` Andreas Färber
2014-11-12 22:25 ` Paolo Bonzini
2014-11-12 22:47 ` Peter Maydell
2014-11-13 10:05 ` Paolo Bonzini
2014-11-13 10:50 ` Peter Maydell
2014-11-12 17:13 ` Paolo Bonzini [this message]
2014-11-13 8:08 ` [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification" Markus Armbruster
2014-11-13 10:08 ` Paolo Bonzini
2014-11-13 14:34 ` Markus Armbruster
2014-11-13 14:39 ` Paolo Bonzini
2014-11-14 14:21 ` Markus Armbruster
2014-11-14 14:25 ` Paolo Bonzini
2014-11-14 15:10 ` 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=54639524.3060205@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=armbru@redhat.com \
--cc=peter.crosthwaite@xilinx.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).