From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzLq6-00068T-FQ for qemu-devel@nongnu.org; Thu, 19 Nov 2015 04:49:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzLq2-0003C4-Dv for qemu-devel@nongnu.org; Thu, 19 Nov 2015 04:49:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzLq2-0003Bi-8R for qemu-devel@nongnu.org; Thu, 19 Nov 2015 04:49:10 -0500 From: Markus Armbruster 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> <20151119092542.GC9247@redhat.com> Date: Thu, 19 Nov 2015 10:49:07 +0100 In-Reply-To: <20151119092542.GC9247@redhat.com> (Daniel P. Berrange's message of "Thu, 19 Nov 2015 09:25:42 +0000") Message-ID: <87k2pe9v58.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL 02/10] qom: Introduce ObjectPropertyIterator struct for iteration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Andreas =?utf-8?Q?F=C3=A4rber?= , qemu-devel@nongnu.org "Daniel P. Berrange" writes: > 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 ? Not even a little deal :)