From c734cd40a10943753a4d015c9d0a6c08c8f0159e Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 16 Sep 2020 14:25:16 -0400 Subject: qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200916182519.415636-3-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- authz/list.c | 1 - authz/listfile.c | 1 - authz/pamacct.c | 1 - authz/simple.c | 1 - 4 files changed, 4 deletions(-) (limited to 'authz') diff --git a/authz/list.c b/authz/list.c index 8e904bfc93..28b990931a 100644 --- a/authz/list.c +++ b/authz/list.c @@ -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 }, diff --git a/authz/listfile.c b/authz/listfile.c index 666df872ad..cd6163aa40 100644 --- a/authz/listfile.c +++ b/authz/listfile.c @@ -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 }, diff --git a/authz/pamacct.c b/authz/pamacct.c index 3c6be43916..c91593bbd8 100644 --- a/authz/pamacct.c +++ b/authz/pamacct.c @@ -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 }, diff --git a/authz/simple.c b/authz/simple.c index 84954b80a5..ee061e980d 100644 --- a/authz/simple.c +++ b/authz/simple.c @@ -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 }, -- cgit v1.2.3