Skip to content

Commit

Permalink
qom/object: fix 2 comment typos
Browse files Browse the repository at this point in the history
Also change the misleading definition of macro OBJECT_CLASS_CHECK

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
Cao jin authored and Michael Tokarev committed Nov 6, 2015
1 parent 9f50315 commit b30d805
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions include/qom/object.h
Expand Up @@ -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__))

/**
Expand Down
2 changes: 1 addition & 1 deletion qom/object.c
Expand Up @@ -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;
Expand Down

0 comments on commit b30d805

Please sign in to comment.