[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 3/5] qobject: replace qobject_incref/QINCREF
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v6 3/5] qobject: replace qobject_incref/QINCREF qobject_decref/QDECREF |
Date: |
Thu, 19 Apr 2018 10:27: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:
> Now that we can safely call QOBJECT() on QObject * as well as its
> subtypes, we can have macros qobject_ref() / qobject_unref() that work
> everywhere instead of having to use QINCREF() / QDECREF() for QObject
> and qobject_incref() / qobject_decref() for its subtypes.
>
> Note that the new macros evaluate their argument exactly once, thus no
> need to shout them.
>
It's still useful information to include in the commit message that you
did the substitution by sed, then fixed up compiler warnings that
resulted from the new macro implementation being slightly more
type-safe, as well as fixing up a long line. That way, if someone
backports this patch, they know how to resolve conflicts and/or check
that they are not missing a conversion.
Writing good commit messages is an art form - but in general, if
something was questioned during review of a previous revision, then it's
never a bad idea to beef up the commit message to answer that question
in advance for the next reviewer.
> Signed-off-by: Marc-André Lureau <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> ---
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- 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 3/5] qobject: replace qobject_incref/QINCREF qobject_decref/QDECREF,
Eric Blake <=
- Re: [Qemu-devel] [PATCH v6 0/5] Simplify qobject refcount, Eric Blake, 2018/04/19