mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00: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:
@ -252,7 +252,6 @@ static const TypeInfo qauthz_list_info = {
|
||||
.name = TYPE_QAUTHZ_LIST,
|
||||
.instance_size = sizeof(QAuthZList),
|
||||
.instance_finalize = qauthz_list_finalize,
|
||||
.class_size = sizeof(QAuthZListClass),
|
||||
.class_init = qauthz_list_class_init,
|
||||
.interfaces = (InterfaceInfo[]) {
|
||||
{ TYPE_USER_CREATABLE },
|
||||
|
@ -263,7 +263,6 @@ static const TypeInfo qauthz_list_file_info = {
|
||||
.instance_init = qauthz_list_file_init,
|
||||
.instance_size = sizeof(QAuthZListFile),
|
||||
.instance_finalize = qauthz_list_file_finalize,
|
||||
.class_size = sizeof(QAuthZListFileClass),
|
||||
.class_init = qauthz_list_file_class_init,
|
||||
.interfaces = (InterfaceInfo[]) {
|
||||
{ TYPE_USER_CREATABLE },
|
||||
|
@ -129,7 +129,6 @@ static const TypeInfo qauthz_pam_info = {
|
||||
.name = TYPE_QAUTHZ_PAM,
|
||||
.instance_size = sizeof(QAuthZPAM),
|
||||
.instance_finalize = qauthz_pam_finalize,
|
||||
.class_size = sizeof(QAuthZPAMClass),
|
||||
.class_init = qauthz_pam_class_init,
|
||||
.interfaces = (InterfaceInfo[]) {
|
||||
{ TYPE_USER_CREATABLE },
|
||||
|
@ -96,7 +96,6 @@ static const TypeInfo qauthz_simple_info = {
|
||||
.name = TYPE_QAUTHZ_SIMPLE,
|
||||
.instance_size = sizeof(QAuthZSimple),
|
||||
.instance_finalize = qauthz_simple_finalize,
|
||||
.class_size = sizeof(QAuthZSimpleClass),
|
||||
.class_init = qauthz_simple_class_init,
|
||||
.interfaces = (InterfaceInfo[]) {
|
||||
{ TYPE_USER_CREATABLE },
|
||||
|
Reference in New Issue
Block a user