mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-30 22:03:54 -06:00
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:
parent
aa1b35b975
commit
3650b2de34
5 changed files with 15 additions and 19 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue