aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-01-07 12:13:08 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-09 18:16:25 +0100
commitbc4e7522ad19890eab8cf1df04360abf610b1236 (patch)
tree72239310bafde276f5a27feb6d42d455de36e109
parentf6f0284b6fd495c4a0d7d3b91317105d8e1a8bf3 (diff)
downloadqemu-bc4e7522ad19890eab8cf1df04360abf610b1236.zip
qemu-bc4e7522ad19890eab8cf1df04360abf610b1236.tar.gz
qemu-bc4e7522ad19890eab8cf1df04360abf610b1236.tar.bz2
qom: remove unused InterfaceInfo::concrete_class field
The "concrete_class" field of InterfaceClass is only ever written, and as far as I can tell is not particularly useful when debugging either; remove it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-ID: <20250107111308.21886-1-pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-rw-r--r--include/qom/object.h5
-rw-r--r--qom/object.c1
2 files changed, 4 insertions, 2 deletions
diff --git a/include/qom/object.h b/include/qom/object.h
index 7793557..9192265 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -573,12 +573,15 @@ struct InterfaceInfo {
*
* The class for all interfaces. Subclasses of this class should only add
* virtual methods.
+ *
+ * Note that most of the fields of ObjectClass are unused (all except
+ * "type", in fact). They are only present in InterfaceClass to allow
+ * @object_class_dynamic_cast to work with both regular classes and interfaces.
*/
struct InterfaceClass
{
ObjectClass parent_class;
/* private: */
- ObjectClass *concrete_class;
Type interface_type;
};
diff --git a/qom/object.c b/qom/object.c
index 58897a7..ec447f1 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -314,7 +314,6 @@ static void type_initialize_interface(TypeImpl *ti, TypeImpl *interface_type,
g_free((char *)info.name);
new_iface = (InterfaceClass *)iface_impl->class;
- new_iface->concrete_class = ti->class;
new_iface->interface_type = interface_type;
ti->class->interfaces = g_slist_append(ti->class->interfaces, new_iface);