[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] authz: Use OBJECT_CHECK() on objects
From: |
Daniel P . Berrangé |
Subject: |
Re: [Qemu-devel] [PATCH] authz: Use OBJECT_CHECK() on objects |
Date: |
Fri, 15 Mar 2019 17:28:55 +0000 |
User-agent: |
Mutt/1.11.3 (2019-02-01) |
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....
>
> Reported-by: Markus Armbruster <address@hidden>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> include/authz/base.h | 4 ++--
> include/authz/list.h | 4 ++--
> include/authz/listfile.h | 4 ++--
> include/authz/pamacct.h | 4 ++--
> include/authz/simple.h | 4 ++--
> 5 files changed, 10 insertions(+), 10 deletions(-)
Reviewed-by: Daniel P. Berrangé <address@hidden>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|