From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9C0z-0000ve-Uv for qemu-devel@nongnu.org; Thu, 19 Apr 2018 12:02:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9C0z-0003Qt-5S for qemu-devel@nongnu.org; Thu, 19 Apr 2018 12:02:30 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:38068) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9C0y-0003Pf-U3 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 12:02:29 -0400 Received: by mail-wr0-x243.google.com with SMTP id h3-v6so15471197wrh.5 for ; Thu, 19 Apr 2018 09:02:28 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <86162f1a-842b-f7aa-7781-f4260309925f@redhat.com> References: <20180419150145.24795-1-marcandre.lureau@redhat.com> <86162f1a-842b-f7aa-7781-f4260309925f@redhat.com> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Thu, 19 Apr 2018 18:02:26 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v6 0/5] Simplify qobject refcount List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: QEMU , Paolo Bonzini , Markus Armbruster Hi On Thu, Apr 19, 2018 at 5:45 PM, Eric Blake wrote: > On 04/19/2018 10:01 AM, Marc-Andr=C3=A9 Lureau wrote: >> Hi, >> >> This series aims to get rid of the distinction between QObject, that >> must use qobject_incref/qobject_decref and its various derived types >> that have to use QINCREF/QDECREF. Instead, replace it with >> qobject_ref/qobject_unref for all types. > > Related question: should we do the same thing for qdict_put() vs. > qdict_put_obj()? That is, now that we have an easy way to always use > QOBJECT(), it makes more sense to just have: > > QObject *o; > QDict *d; > qdict_put(dict, key1, o); > qdict_put(dict, key2, d); > > rather than having to distinguish based on the type of the third argument= . > > Similar for QList additions. Good idea, that would be a lovely follow-up indeed. --=20 Marc-Andr=C3=A9 Lureau