mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-06 20:50:44 +00:00
qom/object: fix 2 comment typos
Also change the misleading definition of macro OBJECT_CLASS_CHECK Backports commit b30d80546421c6ea919096b596887f496c80af0a from qemu
This commit is contained in:
parent
003b2155a1
commit
73c55b2eb3
|
@ -522,16 +522,16 @@ struct TypeInfo
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OBJECT_CLASS_CHECK:
|
* OBJECT_CLASS_CHECK:
|
||||||
* @class: The C type to use for the return value.
|
* @class_type: The C type to use for the return value.
|
||||||
* @obj: A derivative of @type to cast.
|
* @class: A derivative class of @class_type to cast.
|
||||||
* @name: the QOM typename of @class.
|
* @name: the QOM typename of @class_type.
|
||||||
*
|
*
|
||||||
* A type safe version of @object_class_dynamic_cast_assert. This macro is
|
* 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
|
* typically wrapped by each type to perform type safe casts of a class to a
|
||||||
* specific class type.
|
* specific class type.
|
||||||
*/
|
*/
|
||||||
#define OBJECT_CLASS_CHECK(uc, class, obj, name) \
|
#define OBJECT_CLASS_CHECK(uc, class_type, class, name) \
|
||||||
((class *)object_class_dynamic_cast_assert(uc, OBJECT_CLASS(obj), (name), \
|
((class_type *)object_class_dynamic_cast_assert(uc, OBJECT_CLASS(class), (name), \
|
||||||
__FILE__, __LINE__, __func__))
|
__FILE__, __LINE__, __func__))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -199,7 +199,7 @@ static bool type_is_ancestor(struct uc_struct *uc, TypeImpl *type, TypeImpl *tar
|
||||||
{
|
{
|
||||||
assert(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) {
|
while (type) {
|
||||||
if (type == target_type) {
|
if (type == target_type) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue