[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/24] qom/object: fix 2 comment typos
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 17/24] qom/object: fix 2 comment typos |
Date: |
Fri, 6 Nov 2015 15:43:54 +0300 |
From: Cao jin <address@hidden>
Also change the misleading definition of macro OBJECT_CLASS_CHECK
Signed-off-by: Cao jin <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
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 be7280c..0bb89d4 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 11cd86b..fc6e161 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.1.4
- [Qemu-devel] [PULL 00/24] Trivial patches for 2015-11-06, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 09/24] tests/i44fx-test: No need for zeroing memory before memset, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 10/24] linux-user/syscall: Replace g_malloc0 + memcpy with g_memdup, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 01/24] hw/acpi/aml-build: remove useless glib version check, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 06/24] tests: ignore test-qga, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 08/24] hw/input/tsc210x: Remove superfluous memset, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 11/24] hw/dma/pxa2xx: Remove superfluous memset, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 02/24] gdbstub: Fix buffer overflows in gdb_handle_packet(), Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 23/24] qemu-sockets: do not test path with access() before unlinking, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 20/24] target-alpha: fix uninitialized variable, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 17/24] qom/object: fix 2 comment typos,
Michael Tokarev <=
- [Qemu-devel] [PULL 16/24] configure: remove help string for 'vnc-tls' option, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 03/24] hw/display/tcx: Remove superfluous OBJECT() typecasts, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 13/24] ui: Use g_new() & friends where that makes obvious sense, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 24/24] tap-bsd: use user-specified tap device if it already exists, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 14/24] qxl: Use g_new() & friends where that makes obvious sense, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 19/24] ivshmem-server: fix possible OVERRUN, Michael Tokarev, 2015/11/06
- [Qemu-devel] [PULL 07/24] xen: fix invalid assertion, Michael Tokarev, 2015/11/06