From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzLTS-00069Y-7I for qemu-devel@nongnu.org; Thu, 19 Nov 2015 04:25:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzLTO-0005Tz-Ja for qemu-devel@nongnu.org; Thu, 19 Nov 2015 04:25:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzLTO-0005TJ-EB for qemu-devel@nongnu.org; Thu, 19 Nov 2015 04:25:46 -0500 Date: Thu, 19 Nov 2015 09:25:42 +0000 From: "Daniel P. Berrange" Message-ID: <20151119092542.GC9247@redhat.com> References: <1447879178-5440-1-git-send-email-afaerber@suse.de> <1447879178-5440-3-git-send-email-afaerber@suse.de> <87vb8ybb1l.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87vb8ybb1l.fsf@blackfin.pond.sub.org> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL 02/10] qom: Introduce ObjectPropertyIterator struct for iteration Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Andreas =?utf-8?Q?F=C3=A4rber?= , qemu-devel@nongnu.org On Thu, Nov 19, 2015 at 10:20:22AM +0100, Markus Armbruster wrote: > Andreas F=C3=A4rber writes: >=20 > > From: "Daniel P. Berrange" > > > > 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 =3D object_property_iter_init(obj); > > while ((prop =3D object_property_iter_next(iter))) { > > ... do something with prop ... > > } > > object_property_iter_free(iter); >=20 > 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 --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :|