From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5ymG-0008Bd-O2 for qemu-devel@nongnu.org; Fri, 19 Jun 2015 12:04:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5ymC-0006c0-Af for qemu-devel@nongnu.org; Fri, 19 Jun 2015 12:04:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5ymC-0006bg-59 for qemu-devel@nongnu.org; Fri, 19 Jun 2015 12:04:20 -0400 Message-ID: <55843D7E.3080300@redhat.com> Date: Fri, 19 Jun 2015 10:04:14 -0600 From: Eric Blake MIME-Version: 1.0 References: <1432739276-10452-1-git-send-email-berrange@redhat.com> <1432739276-10452-6-git-send-email-berrange@redhat.com> In-Reply-To: <1432739276-10452-6-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="n6A5G4slN8kxNj39XSnSnK9rkG9twGWHb" 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: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --n6A5G4slN8kxNj39XSnSnK9rkG9twGWHb Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > /** > + * 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 mem= ory. > + * The returned object has a reference count of 1, and will be freed w= hen > + * 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/ --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --n6A5G4slN8kxNj39XSnSnK9rkG9twGWHb 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVhD1+AAoJEKeha0olJ0NqzikIAISSaCSdxt4MeXUbORIqMNeU a3F12v7FsTRhE0afd5flegvTZ267ajebNoLbZgHEI7Uv0BQTFvRgpFgYtBKROAwC LBY+I/CwE/IZpNxfbJbA+kIO+dvQ8ndfmzPV3fFyWtZUovhjXu0lpfaYzirNLKUr J3PNHvPNHrjqIcGQ0SjXnNuNuuuOwAmcZpl6UMxQeVNy7rJgatMowwB6jiii2mTn 5L8tFjbtDf7q/pU60v/l7sjVPw73GEkDRbz86cjnssLEuexSXlyM7cp+xDtLl10p wfrEhRLwFcs+AYYqqRXWN7jwmMvlaSHnZReOAT3Iffk1ptJcmfv1saFCt191u7o= =HqDQ -----END PGP SIGNATURE----- --n6A5G4slN8kxNj39XSnSnK9rkG9twGWHb--