From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5zOd-0003pD-4w for qemu-devel@nongnu.org; Fri, 19 Jun 2015 12:44:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5zOZ-0004zU-3T for qemu-devel@nongnu.org; Fri, 19 Jun 2015 12:44:03 -0400 Received: from cantor2.suse.de ([195.135.220.15]:56387 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5zOY-0004yv-QK for qemu-devel@nongnu.org; Fri, 19 Jun 2015 12:43:59 -0400 Message-ID: <558446CD.7010900@suse.de> Date: Fri, 19 Jun 2015 18:43:57 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1432739276-10452-1-git-send-email-berrange@redhat.com> <1432739276-10452-6-git-send-email-berrange@redhat.com> <55843D7E.3080300@redhat.com> <55843E90.6090708@suse.de> <55844081.10208@redhat.com> In-Reply-To: <55844081.10208@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gCrH1axBmSRDLWKI3SHjwDqrfJJNhdh0x" Subject: Re: [Qemu-devel] [PATCH v5 5/8] qom: add object_new_with_props / object_new_withpropv constructors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: Paolo Bonzini This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gCrH1axBmSRDLWKI3SHjwDqrfJJNhdh0x Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Am 19.06.2015 um 18:17 schrieb Eric Blake: > On 06/19/2015 10:08 AM, Andreas F=C3=A4rber wrote: >> Am 19.06.2015 um 18:04 schrieb Eric Blake: >>> On 05/27/2015 09:07 AM, Daniel P. Berrange wrote: >>>> It is reasonably common to want to create an object, set a >>>> number of properties, register it in the hierarchy and then >>>> mark it as complete (if a user creatable type). This requires >>>> quite a lot of error prone, verbose, boilerplate code to achieve. >>>> >>> >>>> /** >>>> + * object_new_with_props: >>>> + * @typename: The name of the type of the object to instantiate. >>>> + * @parent: the parent object >>>> + * @id: The unique ID of the object >>>> + * @errp: pointer to error object >>>> + * @...: list of property names and values >>>> + * >>>> + * This function will initialize a new object using heap allocated = memory. >>>> + * The returned object has a reference count of 1, and will be free= d when >>>> + * the last reference is dropped. >>>> + * >>>> + * The @id parameter will be used when registering the object as a >>>> + * child of @parent in the objects composition tree. >>> >>> s/objects/object's/ >> >> Actually I think /objects is meant, so looks okay to me? >=20 > Then s,objects,/objects, :) >=20 > Yes, that reads okay as well (and now you see why adding a character, > whether / or ', makes a difference). Erm, on second thoughts "object composition tree" is meant. :) The parent is specified by the caller. And since that file always just talks of "composition tree" except for one case where it says "QOM composition tree", let's just adapt to that. Andreas --=20 SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Felix Imend=C3=B6rffer, Jane Smithard, Dilip Upmanyu, Graham Norton; = HRB 21284 (AG N=C3=BCrnberg) --gCrH1axBmSRDLWKI3SHjwDqrfJJNhdh0x Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJVhEbNAAoJEPou0S0+fgE/JfQQAJqMThro8SK5BadAo3bVww9l IxbIkboH7ys6DILDS2IB0Z5FfDEivcNGjHdLwQPx7+InqvfL8ArCCzT4+rGVhma0 hv7LuIqM2rZkBMHepPrAIG3bepGgRhMGMISdvgBT4wLloDcVjKqgw8rbm5jgzGvB XQCt7qYJb2lBTBqz7uxOWHz9RbcUn8zPYu5mGxCBaGDHUnbOi7wXRuGejCvxKU/8 nPWeGNtd3JEgcZMLzddUNrnyUhTksP1PEg37vNK++o0cNUyEyYPMpRD9faTE0Gyb 0WJhcW7Em2Hv+7Fyi4FGOFFaRmPLjJv9RQJ1jLLAgJYcASL+adSp9nPVpWR5tEKH UcDLWIWoHe4fpbe3i1io8PWaNcUKHGLKIdp1aOYuoAESvNmTVb5G76mwSPBlMcHW s05OXX9iWh/VrW6z27xP1pbqv71UUrx4oA3dzBMX2NKLmLhNCkiO9Q5RtBslvQcI rl32OGc8R7h0CQsG8/RxwCRgxp6t4/oDmaDPnJrUDCSnFAm1hJCPvbzbhDBtMVZW RHhiIJVg11IvhBCvT48CgShlyAfd83jfuuvRahY/TfqkmUFFGv3oaEvVJfHGEG3P d2z8R2xf0CXQmTMwA9dN8sDlh0ONiFjoxL6vboxjr1raSTGM1E+Od0XoeKHsifxN jqetLth9vjZSncVTRwO6 =blP3 -----END PGP SIGNATURE----- --gCrH1axBmSRDLWKI3SHjwDqrfJJNhdh0x--