[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 0/5] Simplify qobject refcount
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH v6 0/5] Simplify qobject refcount |
Date: |
Thu, 19 Apr 2018 18:02:26 +0200 |
Hi
On Thu, Apr 19, 2018 at 5:45 PM, Eric Blake <address@hidden> wrote:
> On 04/19/2018 10:01 AM, Marc-André 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.
--
Marc-André Lureau
- Re: [Qemu-devel] [PATCH v6 1/5] qobject: ensure base is at offset 0, (continued)
- [Qemu-devel] [PATCH v6 2/5] qobject: use a QObjectBase_ struct, Marc-André Lureau, 2018/04/19
- [Qemu-devel] [PATCH v6 5/5] qobject: modify qobject_ref() to assert on NULL, Marc-André Lureau, 2018/04/19
- [Qemu-devel] [PATCH v6 4/5] qobject: modify qobject_ref() to return obj, Marc-André Lureau, 2018/04/19
- [Qemu-devel] [PATCH v6 3/5] qobject: replace qobject_incref/QINCREF qobject_decref/QDECREF, Marc-André Lureau, 2018/04/19
- Re: [Qemu-devel] [PATCH v6 0/5] Simplify qobject refcount, Eric Blake, 2018/04/19
- Re: [Qemu-devel] [PATCH v6 0/5] Simplify qobject refcount,
Marc-André Lureau <=