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 don't get infinite expansion, although I did a double-take the
> first time I read through the patch (especially since your v2 used the
> name qobject_ref_impl() for the function, distinct from the macro name).
>  Worth a comment?

I prefer qobject_ref_impl, FWIW.  There are already a few examples in
include/qemu/thread.h and include/qemu/coroutine.h.

Thanks,

Paolo

Reply via email to