diff options
Diffstat (limited to 'qom')
-rw-r--r-- | qom/object.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qom/object.c b/qom/object.c index 7a05e35..760fafb 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); |