Previously classes indirectly implementing an interface more than
once were triggering the ambiguous cast assertion. Since we are not
interested in the returned class, but only whether it implements or
not, use object_class_implements_type().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
qom/object.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qom/object.c b/qom/object.c
index 536308c0553..6733adcd6b2 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1136,7 +1136,7 @@ static void object_class_foreach_tramp(gpointer key, gpointer value,
}
if (data->implements_type &&
- !object_class_dynamic_cast(k, data->implements_type)) {
+ !object_class_implements_type(k, data->implements_type)) {
return;
}
--
2.47.1