On 9 May 2014 16:56, Peter Maydell <peter.mayd...@linaro.org> 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