From b30d80546421c6ea919096b596887f496c80af0a Mon Sep 17 00:00:00 2001 From: Cao jin Date: Tue, 3 Nov 2015 10:36:42 +0800 Subject: [PATCH] qom/object: fix 2 comment typos Also change the misleading definition of macro OBJECT_CLASS_CHECK Signed-off-by: Cao jin Signed-off-by: Michael Tokarev --- include/qom/object.h | 10 +++++----- qom/object.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index be7280c862..0bb89d481e 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -510,16 +510,16 @@ struct TypeInfo /** * OBJECT_CLASS_CHECK: - * @class: The C type to use for the return value. - * @obj: A derivative of @type to cast. - * @name: the QOM typename of @class. + * @class_type: The C type to use for the return value. + * @class: A derivative class of @class_type to cast. + * @name: the QOM typename of @class_type. * * A type safe version of @object_class_dynamic_cast_assert. This macro is * typically wrapped by each type to perform type safe casts of a class to a * specific class type. */ -#define OBJECT_CLASS_CHECK(class, obj, name) \ - ((class *)object_class_dynamic_cast_assert(OBJECT_CLASS(obj), (name), \ +#define OBJECT_CLASS_CHECK(class_type, class, name) \ + ((class_type *)object_class_dynamic_cast_assert(OBJECT_CLASS(class), (name), \ __FILE__, __LINE__, __func__)) /** diff --git a/qom/object.c b/qom/object.c index 11cd86b931..fc6e161088 100644 --- a/qom/object.c +++ b/qom/object.c @@ -204,7 +204,7 @@ static bool type_is_ancestor(TypeImpl *type, TypeImpl *target_type) { assert(target_type); - /* Check if typename is a direct ancestor of type */ + /* Check if target_type is a direct ancestor of type */ while (type) { if (type == target_type) { return true; -- 2.11.4.GIT