Il 28/02/2012 10:43, Igor Mitsyanko ha scritto:
On 02/28/2012 12:39 PM, Paolo Bonzini wrote:
Il 28/02/2012 08:18, Igor Mitsyanko ha scritto:
QOM documentation states that for objects of type with @instance_size
== 0 size
will be assigned to match parent object's size. But currently this
feauture is
not implemented and qemu asserts during creation of object with zero
instance_size.
This patch adjusts actual behaviour in accordance with documentation.
You can do it just once, in type_get_parent instead.
Sorry, rewind. "You can do it in type_class_init instead" (you are
obviously doing it just once since you assign to type->instance_size).
type_class_init mostly deals with class initialization, but it's really
the place where a type is hooked up with its parent...