From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqohI-0000m9-RW for qemu-devel@nongnu.org; Fri, 08 May 2015 16:16:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqohE-0007y5-QH for qemu-devel@nongnu.org; Fri, 08 May 2015 16:16:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqohE-0007xs-KM for qemu-devel@nongnu.org; Fri, 08 May 2015 16:16:32 -0400 Message-ID: <554D199F.3020300@redhat.com> Date: Fri, 08 May 2015 14:16:31 -0600 From: Eric Blake MIME-Version: 1.0 References: <1430476206-26034-1-git-send-email-berrange@redhat.com> <1430476206-26034-5-git-send-email-berrange@redhat.com> <554CEE19.2010704@suse.de> In-Reply-To: <554CEE19.2010704@suse.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="K7qWPtQfKPGk2O7rnV6b35Iw7bDulXLvm" Subject: Re: [Qemu-devel] [PATCH v3 4/7] qom: add object_new_propv / object_new_proplist constructors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Paolo Bonzini This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --K7qWPtQfKPGk2O7rnV6b35Iw7bDulXLvm Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/08/2015 11:10 AM, Andreas F=C3=A4rber wrote: > Hi Daniel/Paolo, >=20 > Am 01.05.2015 um 12:30 schrieb Daniel P. Berrange: >> 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_unref(OBJECT(obj)); >> + return obj; >> + >> + error: >=20 > Intentionally indented? Yes. Emacs c-mode defaults to indenting like this on purpose, in order to leave column 1 reserved for the start of a function. Besides, things like 'diff -p' search for content in column 1, and if top-level labels are not indented to column 2, then they get interpreted as function names, making the diff a bit less useful. Libvirt has gone one step further and enforces this indentation style during its 'make syntax-check'; I'm sure if we wanted to do likewise in qemu, we could patch scripts/checkpatch.pl to enforce a particular style. But right now, I'm personally okay with not worrying about it. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --K7qWPtQfKPGk2O7rnV6b35Iw7bDulXLvm 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/ iQEcBAEBCAAGBQJVTRmfAAoJEKeha0olJ0Nq/icH/RitqTmzkwSLkytBcB8bKKzb zFUF5pFJBHksez2LIUxBZEjf7PklUxPHmfXYen8rqO5UwlbSBAKPdpeHN30gTeiH N9xy63tyRdeOP7XcFSs+td1QB5zM/hw1Lu+GEIjbNQ3B/zPlZW0TOP6//HLrkTGe 9K7/6qDQAlJVfeVStBL/hIG3H55mJHCigrNiosnuuiHePzZl21Wp6OjNzyxL28W1 PB09xsz94R93DrTy0+cU04kDLa0no+AyQZbxGAqWAMSEmO621/VEMz3giBPK1HRp ePEcyz66dVnvEEoNRiFk5t1M55jogfORiNc7yXo5uIDZn6nulRYuKc1UvUKCWbU= =orlS -----END PGP SIGNATURE----- --K7qWPtQfKPGk2O7rnV6b35Iw7bDulXLvm--