From 3650b2de3418daf38960a1d87f6ce1f1bf80183c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 4 Dec 2018 18:20:07 +0400 Subject: qom: make user_creatable_complete() specific to UserCreatable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Igor Mammedov Reviewed-by: Eduardo Habkost Message-Id: <20181204142023.15982-4-marcandre.lureau@redhat.com> Signed-off-by: Eduardo Habkost --- include/qom/object_interfaces.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/qom') diff --git a/include/qom/object_interfaces.h b/include/qom/object_interfaces.h index 652a16d2ba..682ba1d9b0 100644 --- a/include/qom/object_interfaces.h +++ b/include/qom/object_interfaces.h @@ -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: -- cgit v1.2.3