339c2708 | 23-Nov-2012 |
Paolo Bonzini <pbonzini@redhat.com> |
qom: make object_finalize static
It is not used anymore, and there is no need to make it public.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.c
qom: make object_finalize static
It is not used anymore, and there is no need to make it public.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
fde9bf44 | 23-Nov-2012 |
Paolo Bonzini <pbonzini@redhat.com> |
qom: make object_delete usable for statically-allocated objects
Store in the object the freeing function that will be used at deletion time. This makes it possible to use object_delete on staticall
qom: make object_delete usable for statically-allocated objects
Store in the object the freeing function that will be used at deletion time. This makes it possible to use object_delete on statically-allocated (embedded) objects. Dually, it makes it possible to use object_unparent and object_unref without leaking memory, when the lifetime of object might extend until after the call to object_delete.
Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
667d22d1 | 23-Nov-2012 |
Paolo Bonzini <pbonzini@redhat.com> |
qdev: move bus removal to object_unparent
Add an ObjectClass method that is done at object_unparent time. It should remove any backlinks to the object in the composition tree, so that object_delete
qdev: move bus removal to object_unparent
Add an ObjectClass method that is done at object_unparent time. It should remove any backlinks to the object in the composition tree, so that object_delete will be able to drop the last reference and free the object.
Use it for qdev buses.
Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
764b6312 | 23-Nov-2012 |
Paolo Bonzini <pbonzini@redhat.com> |
qom: fix refcount of non-heap-allocated objects
The reference count for embedded objects is always one too low, because object_initialize_with_type returns with zero references to the object. This c
qom: fix refcount of non-heap-allocated objects
The reference count for embedded objects is always one too low, because object_initialize_with_type returns with zero references to the object. This causes premature finalization of the object (or an assertion failure) after calling object_ref to add an extra reference and object_unref to remove it.
The fix is to move the initial object_ref call from object_new_with_type to object_initialize_with_type.
Acked-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
2f262e06 | 02-Apr-2012 |
Paolo Bonzini <pbonzini@redhat.com> |
qdev: Push "type" property up to Object
Now that Object is a type, add an instance_init function and push the "type" property from qdev to there.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qdev: Push "type" property up to Object
Now that Object is a type, add an instance_init function and push the "type" property from qdev to there.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
show more ...
|
049cb3cf | 04-Apr-2012 |
Paolo Bonzini <pbonzini@redhat.com> |
qom: Assert that public types have a non-NULL parent field
This protects against unwanted effects of changing TYPE_OBJECT from NULL to a string.
Suggested-by: Andreas Färber <afaerber@suse.de> Sign
qom: Assert that public types have a non-NULL parent field
This protects against unwanted effects of changing TYPE_OBJECT from NULL to a string.
Suggested-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
show more ...
|
745549c8 | 31-Mar-2012 |
Paolo Bonzini <pbonzini@redhat.com> |
qom: Make Object a type
Right now the base Object class has a special NULL type. Change this so that we will be able to add class_init and class_base_init callbacks. To do this, remove some special
qom: Make Object a type
Right now the base Object class has a special NULL type. Change this so that we will be able to add class_init and class_base_init callbacks. To do this, remove some special casing of ObjectClass that is not really necessary.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
show more ...
|
3b50e311 | 02-May-2012 |
Paolo Bonzini <pbonzini@redhat.com> |
qom: Add class_base_init
The class_base_init TypeInfo callback was present in one of the early QOM versions but removed (on my request...) before committing. We will need it soon, add it.
Signed-o
qom: Add class_base_init
The class_base_init TypeInfo callback was present in one of the early QOM versions but removed (on my request...) before committing. We will need it soon, add it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
show more ...
|
32efc535 | 11-Apr-2012 |
Paolo Bonzini <pbonzini@redhat.com> |
qom: Add object_child_foreach()
A utility function that will be used to implement hierarchical realization.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori
qom: Add object_child_foreach()
A utility function that will be used to implement hierarchical realization.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> [AF: Drop unrelated whitespace change, add Returns: in documentation] [AF: Use new object_property_is_child() helper.] Signed-off-by: Andreas Färber <afaerber@suse.de>
show more ...
|