Skip to content

Commit bc4e752

Browse files
bonziniphilmd
authored andcommitted
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 <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Message-ID: <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
1 parent f6f0284 commit bc4e752

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

include/qom/object.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,12 +573,15 @@ struct InterfaceInfo {
573573
*
574574
* The class for all interfaces. Subclasses of this class should only add
575575
* virtual methods.
576+
*
577+
* Note that most of the fields of ObjectClass are unused (all except
578+
* "type", in fact). They are only present in InterfaceClass to allow
579+
* @object_class_dynamic_cast to work with both regular classes and interfaces.
576580
*/
577581
struct InterfaceClass
578582
{
579583
ObjectClass parent_class;
580584
/* private: */
581-
ObjectClass *concrete_class;
582585
Type interface_type;
583586
};
584587

qom/object.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ static void type_initialize_interface(TypeImpl *ti, TypeImpl *interface_type,
314314
g_free((char *)info.name);
315315

316316
new_iface = (InterfaceClass *)iface_impl->class;
317-
new_iface->concrete_class = ti->class;
318317
new_iface->interface_type = interface_type;
319318

320319
ti->class->interfaces = g_slist_append(ti->class->interfaces, new_iface);

0 commit comments

Comments
 (0)