diff options
Diffstat (limited to 'qom')
-rw-r--r-- | qom/cpu.c | 2 | ||||
-rw-r--r-- | qom/object.c | 6 |
2 files changed, 7 insertions, 1 deletions
@@ -22,7 +22,7 @@ #include "qapi/error.h" #include "qemu-common.h" #include "qom/cpu.h" -#include "sysemu/kvm.h" +#include "sysemu/hw_accel.h" #include "qemu/notify.h" #include "qemu/log.h" #include "exec/log.h" diff --git a/qom/object.c b/qom/object.c index 7a05e35ed9..760fafb0dc 100644 --- a/qom/object.c +++ b/qom/object.c @@ -272,6 +272,12 @@ static void type_initialize(TypeImpl *ti) ti->class_size = type_class_get_size(ti); ti->instance_size = type_object_get_size(ti); + /* Any type with zero instance_size is implicitly abstract. + * This means interface types are all abstract. + */ + if (ti->instance_size == 0) { + ti->abstract = true; + } ti->class = g_malloc0(ti->class_size); |