qom: make user_creatable_complete() specific to UserCreatable

Instead of accepting any Object*, change user_creatable_complete() to
require a UserCreatable*. Modify the callers to pass the appropriate
argument, removing redundant dynamic cast checks in object creation.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20181204142023.15982-4-marcandre.lureau@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
Marc-André Lureau 2018-12-04 18:20:07 +04:00 committed by Eduardo Habkost
parent aa1b35b975
commit 3650b2de34
5 changed files with 15 additions and 19 deletions

View file

@ -51,14 +51,14 @@ typedef struct UserCreatableClass {
/**
* user_creatable_complete:
* @obj: the object whose complete() method is called if defined
* @uc: the user-creatable object whose complete() method is called if defined
* @errp: if an error occurs, a pointer to an area to store the error
*
* Wrapper to call complete() method if one of types it's inherited
* from implements USER_CREATABLE interface, otherwise the call does
* nothing.
*/
void user_creatable_complete(Object *obj, Error **errp);
void user_creatable_complete(UserCreatable *uc, Error **errp);
/**
* user_creatable_can_be_deleted: