qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 0/4] Allow QOM struct fields to be marked as


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 0/4] Allow QOM struct fields to be marked as private
Date: Fri, 23 May 2014 12:13:42 +0100

On 9 May 2014 16:56, Peter Maydell <address@hidden> wrote:
> This patch series provides infrastructure and documentation
> for marking QOM struct fields as private to the class implementation.
>
> Patch 1 is the implementation (which is a trivial five lines!) and
> documentation of the code pattern that it's intended to be used with.
>
> Patches 2, 3 and 4 are examples of its use: patch 2 deals with
> the ARM GIC classes, as an example of a largish class with some
> subclasses. Patches 3 and 4 are conversions of much simpler and
> smaller devices, so might be easier to look at first.
>
> A .h file which uses this pattern ends up with half a dozen
> extra lines of boilerplate, which is slightly sad but not too
> awful. It would be pretty easy to autogenerate (along with the
> type macros themselves) if we decided to do that in future, though.
>
> Example of the compiler message if you try to touch a field
> which is private:
>  arm_gic_kvm.c:559:5: error: ‘iomem’ is deprecated (declared at 
> /root/qemu/include/hw/intc/arm_gic_common.h:105): this field is private 
> [-Werror=deprecated-declarations]

Ping?

thanks
-- PMM



reply via email to

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