提交 684546d8 编写于 作者: M Marc-André Lureau

qom/object: fix iterating properties over a class

object_class_property_iter_init() starts from the given class, so the
next class should continue with the parent class.
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 9cbef9d6
...@@ -1115,7 +1115,7 @@ void object_class_property_iter_init(ObjectPropertyIterator *iter, ...@@ -1115,7 +1115,7 @@ void object_class_property_iter_init(ObjectPropertyIterator *iter,
ObjectClass *klass) ObjectClass *klass)
{ {
g_hash_table_iter_init(&iter->iter, klass->properties); g_hash_table_iter_init(&iter->iter, klass->properties);
iter->nextclass = klass; iter->nextclass = object_class_get_parent(klass);
} }
ObjectProperty *object_class_property_find(ObjectClass *klass, const char *name, ObjectProperty *object_class_property_find(ObjectClass *klass, const char *name,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册