mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE
The requirement to specify the parent class type makes the macro harder to use and easy to misuse (silent bugs can be introduced if the wrong struct type is specified). Simplify the macro by just not declaring any class struct, allowing us to remove the class_size field from the TypeInfo variables for those types. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200916182519.415636-3-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
4a15e5bef8
commit
c734cd40a1
20 changed files with 19 additions and 30 deletions
|
@ -197,7 +197,6 @@ static const TypeInfo vhost_user_backend_info = {
|
|||
.instance_size = sizeof(VhostUserBackend),
|
||||
.instance_init = vhost_user_backend_init,
|
||||
.instance_finalize = vhost_user_backend_finalize,
|
||||
.class_size = sizeof(VhostUserBackendClass),
|
||||
};
|
||||
|
||||
static void register_types(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue