On Wed, Jul 03, 2019 at 07:37:46AM +0200, Paolo Bonzini wrote: > On 03/07/19 07:05, Markus Armbruster wrote: > > static const TypeInfo iommu_memory_region_info = { > > .parent = TYPE_MEMORY_REGION, > > .name = TYPE_IOMMU_MEMORY_REGION, > > .class_size = sizeof(IOMMUMemoryRegionClass), > > .instance_size = sizeof(IOMMUMemoryRegion), > > .instance_init = iommu_memory_region_initfn, > > .abstract = true, > > }; > > > > typedef struct IOMMUMemoryRegionClass { > > /* private */ > > ---> struct DeviceClass parent_class; > > [...] > > }; > > > > struct IOMMUMemoryRegion { > > MemoryRegion parent_obj; > > [...] > > }; > > > > The parent is TYPE_MEMORY_REGION, and the instance struct's first member is > > TYPE_MEMORY_REGION's instance struct as I expect, but the class struct's > > first member is something else entirely. > > Cut-and-paste error. MemoryRegion adds no methods so that could be > either ObjectClass or better > > typedef struct MemoryRegionClass { > /* private */ > ObjectClass parent_class; > } ObjectClass;
I concur. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature