qemu-devel
[Top][All Lists]
Advanced

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

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


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v5 0/5] Simplify qobject refcount
Date: Thu, 19 Apr 2018 15:13:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Marc-André Lureau <address@hidden> writes:

> Hi
>
> On Thu, Apr 19, 2018 at 12:09 PM, Marc-André Lureau
> <address@hidden> wrote:
>>> On the one hand, we provide safe conversion macros QOBJECT() and
>>> qobject_to().  By the way, shouting one but not the other is a bit ugly.
>>
>> QOBJECT is static upcast, the compiler will shout.
>> qobject_to() is dynamic downcast, the runtime shout.
>
> Actually it doesn't shout, it merely tries and return NULL if it can't
> do it. So I understand what you mean now. So it's a balance, but so
> far, it seems those 2 fit our needs.

Misunderstanding?  By "shouting", I meant spelling all-caps.

The convention to shout macros makes sense because you generally need to
know when something's a macro.  In cases where you don't need to know,
it's okay not to shout.

>> I don't like to spent too much time on this, yet as you said, this is
>> a lovely improvement, so is there any real blocker left?
>
> I'll try to address your comments from v5 patches and send a v6.

Thanks!



reply via email to

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