From: Alexander Barabash <alexander_barabash@mentor.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] Add object_property_get_child().
Date: Mon, 20 Feb 2012 13:13:55 +0200 [thread overview]
Message-ID: <4F422AF3.2070807@mentor.com> (raw)
In-Reply-To: <4F420E3D.40307@redhat.com>
On 02/20/2012 11:11 AM, Paolo Bonzini wrote:
> On 02/19/2012 01:36 PM, Alexander Barabash wrote:
>>
>> The proposed object_property_get_child() may return either
>> the direct child with the specified name in the composition tree,
>> or the value of the link with the specified name, as
>> object_property_get_link() indeed does.
> Have you actually checked that object_property_get_link() doesn't work
> for you? It seems to me that your patch does the same as the one-liner:
>
> #define object_property_get_child object_property_get_link
>
> Now _this_ would be good for qemu-trivial. ;)
You are right. Please disregard my v2 patch.
I would only suggest that the documentation of object_property_add_child()
be amended to reflect the fact that the child object may be retrieved using
object_property_get_link().
>> but does it in a more straightforward way.
> I disagree that it is more straightforward. It is more *direct*
> perhaps, in that it doesn't go through visitors,
> object_get_child_property and object_resolve_path, but it also violates
> the encapsulation that properties provide quite heavily.
>
> Peeking at the opaque values of properties should be done as sparingly
> as possible. Ideally once, since no QOM property code should be in a
> fast path. In this case, it is done in object_resolve_abs_path, and
> that should be enough.
>
> Paolo
Alex
next prev parent reply other threads:[~2012-02-20 11:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 17:39 [Qemu-devel] [PATCH] Add object_property_get_child() Alexander Barabash
2012-02-16 18:16 ` Peter Maydell
2012-02-17 10:17 ` Paolo Bonzini
2012-02-19 12:36 ` Alexander Barabash
2012-02-19 16:04 ` [Qemu-devel] [PATCH v2] Revised: " Alexander Barabash
2012-02-19 17:14 ` Andreas Färber
2012-02-19 18:30 ` Peter Maydell
2012-02-20 15:06 ` Alexander Barabash
2012-02-20 11:14 ` Alexander Barabash
2012-02-20 9:11 ` [Qemu-devel] [PATCH] " Paolo Bonzini
2012-02-20 11:13 ` Alexander Barabash [this message]
2012-02-20 11:33 ` Paolo Bonzini
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=4F422AF3.2070807@mentor.com \
--to=alexander_barabash@mentor.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 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).