qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 0/5] Simplify qobject refcount


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v6 0/5] Simplify qobject refcount
Date: Thu, 19 Apr 2018 10:45:18 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

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.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]