[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/25] qom: make Object a type
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 04/25] qom: make Object a type |
Date: |
Tue, 03 Apr 2012 15:06:34 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
Il 03/04/2012 14:30, Andreas Färber ha scritto:
>> > 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.
> While the patch itself looks good, we should be aware that this changes
> semantics: Before this patch, lack of .parent is identical to .parent =
> TYPE_OBJECT; with this patch that would become another base class.
> Should be mentioned in the commit message and all TypeInfos need to be
> reviewed. I don't think accidentally growing base classes is a good
> idea. Maybe whitelist valid base classes in type_register_static() and
> abort otherwise? Then at least we'd catch it by just running the
> executables.
>
Good idea.
Paolo
- [Qemu-devel] [PATCH 00/25] qdev properties final installment: push, push!, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 04/25] qom: make Object a type, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 01/25] qom: add object_class_get_parent, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 02/25] qom: add object_child_foreach, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 03/25] qom: add class_base_init, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 05/25] qom: push type up to Object, Paolo Bonzini, 2012/04/03