]> git.proxmox.com Git - mirror_qemu.git/commit - qom/object.c
qom: if @instance_size==0, assign size of object to parent object size
authorIgor Mitsyanko <i.mitsyanko@samsung.com>
Tue, 28 Feb 2012 11:57:10 +0000 (15:57 +0400)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 14 Mar 2012 20:30:38 +0000 (15:30 -0500)
commitaca59af612840772f18598363b65a25bf02bb569
tree1a0c14611c1eb9451a31331bec2a9836b3f6171e
parent9512e4a9edef2d9b59eb10a03184cd90a34f62d5
qom: if @instance_size==0, assign size of object to parent object size

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.

Set appropriate value for type instance_size during type_class_init() call.
object_initialize_with_type() must call type_class_init() before asserting
type->instance_size, and object_new_with_type() must call type_class_init() before
object allocation.

Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qom/object.c