Eric Blake <ebl...@redhat.com> writes: > 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.
What about inserting The replacement is mechanical, except I broke a long line, and added a cast in monitor_qmp_cleanup_req_queue_locked(). Unlike qobject_decref(), qobject_unref() doesn't accept void *. The justification sounds awkward because it is. qobject_unref() turns out to be less function-like than it looks on first glance. The actual culprit is QOBJECT(). > 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 <marcandre.lur...@redhat.com> >> Reviewed-by: Eric Blake <ebl...@redhat.com>