From: "Daniel P. Berrange" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Andreas Färber" <afaerber@suse.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PULL 02/10] qom: Introduce ObjectPropertyIterator struct for iteration
Date: Thu, 19 Nov 2015 09:25:42 +0000 [thread overview]
Message-ID: <20151119092542.GC9247@redhat.com> (raw)
In-Reply-To: <87vb8ybb1l.fsf@blackfin.pond.sub.org>
On Thu, Nov 19, 2015 at 10:20:22AM +0100, Markus Armbruster wrote:
> Andreas Färber <afaerber@suse.de> writes:
>
> > From: "Daniel P. Berrange" <berrange@redhat.com>
> >
> > Some users of QOM need to be able to iterate over properties
> > defined against an object instance. Currently they are just
> > directly using the QTAIL macros against the object properties
> > data structure.
> >
> > This is bad because it exposes them to changes in the data
> > structure used to store properties, as well as changes in
> > functionality such as ability to register properties against
> > the class.
> >
> > This provides an ObjectPropertyIterator struct which will
> > insulate the callers from the particular data structure
> > used to store properties. It can be used thus
> >
> > ObjectProperty *prop;
> > ObjectPropertyIterator *iter;
> >
> > iter = object_property_iter_init(obj);
> > while ((prop = object_property_iter_next(iter))) {
> > ... do something with prop ...
> > }
> > object_property_iter_free(iter);
>
> I see my review hasn't been addressed, probably because it came late.
> Would you accept a follow-up patch to bring the iterator into line with
> existing ones?
I'll write such a patch if you like, but i guess waiting for it to merge
till 2.6 is no big deal ?
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
next prev parent reply other threads:[~2015-11-19 9:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 20:39 [Qemu-devel] [PULL for-2.5 00/10] QOM devices patch queue 2015-11-18 Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 01/10] qdev: Change Property::offset field to ptrdiff_t type Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 02/10] qom: Introduce ObjectPropertyIterator struct for iteration Andreas Färber
2015-11-19 9:20 ` Markus Armbruster
2015-11-19 9:25 ` Daniel P. Berrange [this message]
2015-11-19 9:49 ` Markus Armbruster
2015-11-19 10:24 ` Andreas Färber
2015-11-19 13:42 ` Markus Armbruster
2015-11-18 20:39 ` [Qemu-devel] [PULL 03/10] qmp: Convert QMP code to use object property iterators Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 04/10] vl: Convert machine help " Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 05/10] ppc: Convert spapr " Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 06/10] net: Convert net filter " Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 07/10] qom: Add a test case for complex property finalization Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 08/10] qom: Replace object property list with GHashTable Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 09/10] qom: Clean up assertions to display values on failure Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 10/10] MAINTAINERS: Add check-qom-{interface, proplist} to QOM Andreas Färber
2015-11-19 13:55 ` Daniel P. Berrange
2015-11-19 13:58 ` Igor Mammedov
2015-11-19 10:54 ` [Qemu-devel] [PULL for-2.5 00/10] QOM devices patch queue 2015-11-18 Peter Maydell
2015-11-19 11:53 ` Daniel P. Berrange
2015-11-19 14:09 ` Andreas Färber
2015-11-19 14:13 ` Daniel P. Berrange
-- strict thread matches above, loose matches on Subject: below --
2015-11-18 20:22 Andreas Färber
2015-11-18 20:22 ` [Qemu-devel] [PULL 02/10] qom: Introduce ObjectPropertyIterator struct for iteration Andreas Färber
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=20151119092542.GC9247@redhat.com \
--to=berrange@redhat.com \
--cc=afaerber@suse.de \
--cc=armbru@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).