diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2025-01-07 11:42:49 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-01-10 23:34:44 +0100 |
commit | b7bd800eba69bab75b8c296ad788df8df8947aae (patch) | |
tree | 0cd894621c22433e3921b8c1894aaf02174adf19 | |
parent | d2c12785be06da708fe1c8e4e81d7134f4f3c56a (diff) | |
download | qemu-b7bd800eba69bab75b8c296ad788df8df8947aae.zip qemu-b7bd800eba69bab75b8c296ad788df8df8947aae.tar.gz qemu-b7bd800eba69bab75b8c296ad788df8df8947aae.tar.bz2 |
qom: remove unused 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>
-rw-r--r-- | include/qom/object.h | 5 | ||||
-rw-r--r-- | qom/object.c | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/qom/object.h b/include/qom/object.h index 95d6e06..f28ffea 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 b4c52d0..e9dfad8 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); |