qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] authz: Use OBJECT_CHECK() on objects


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] authz: Use OBJECT_CHECK() on objects
Date: Fri, 15 Mar 2019 19:31:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Daniel P. Berrangé <address@hidden> writes:

> On Fri, Mar 15, 2019 at 06:12:18PM +0100, Philippe Mathieu-Daudé wrote:
>> TYPE_QAUTHZ is an abstract object of type TYPE_OBJECT. All other
>> are children of TYPE_QAUTHZ, thus also objects.
>> 
>> Keep INTERFACE_CHECK() for interfaces, and use OBJECT_CHECK() on
>> objects.
>
> Hmm
>
>   #define OBJECT_CHECK(type, obj, name) \
>     ((type *)object_dynamic_cast_assert(OBJECT(obj), (name), \
>                                         __FILE__, __LINE__, __func__))
>
>   #define INTERFACE_CHECK(interface, obj, name) \
>     ((interface *)object_dynamic_cast_assert(OBJECT((obj)), (name), \
>                                              __FILE__, __LINE__, __func__))
>
> /me now wonders why INTERFACE_CHECK needs to exist at all....

Valid question.  See

Subject: Issues around TYPE_INTERFACE
Date: Tue, 12 Mar 2019 11:50:54 +0100
Message-ID: <address@hidden>

[...]



reply via email to

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