Re: [Qemu-devel] [PATCH v3 3/4] qobject: replace qobject_incref/QINCREF qobject_decref/QDECREF

2018-04-13 Thread Paolo Bonzini
On 29/03/2018 18:23, Eric Blake wrote: >> >>   +/** >> + * qobject_ref(): Increment QObject's reference count >> + */ >> +#define qobject_ref(obj)    \ >> +    qobject_ref(QOBJECT(obj)) > > ...below the functions of the same name.  C preprocessor rules guarantee > that you

Re: [Qemu-devel] [PATCH v3 3/4] qobject: replace qobject_incref/QINCREF qobject_decref/QDECREF

2018-03-29 Thread Eric Blake
On 03/29/2018 10:48 AM, Marc-André Lureau wrote: Now that we can safely call QOBJECT() on QObject * and children types, we can have a single macro to ref/unref the object. Change the incref/decref prefix name for the more common ref/unref. Note that before the patch, "QDECREF(obj)" was