[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 0/5] Simplify qobject refcount
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH v5 0/5] Simplify qobject refcount |
Date: |
Thu, 19 Apr 2018 13:48:12 +0200 |
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.
> 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.
--
Marc-André Lureau
- [Qemu-devel] [PATCH v5 5/5] qobject: modify qobject_ref() to assert on NULL, (continued)