Skip to contentSkip to conversation

qom/container: remove .instance_size initializer from container_info

PATCH Applied Masahiro Yamada 2 participants 2 messages May 13, 2020 – May 21, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qom/container: remove .instance_size initializer from container_info

You can omit .instance_size if it is the same as that of the parent.

.class_size = sizeof(ObjectClass)

... is omitted here, so removing .instance_size is more consistent.

---

 qom/container.c | 1 -
 1 file changed, 1 deletion(-)
qom/container.c +0 -1
index f6ccaf7ea7..4c030d6dda 100644
@@ -16,7 +16,6 @@
 
 static const TypeInfo container_info = {
     .name          = "container",
-    .instance_size = sizeof(Object),
     .parent        = TYPE_OBJECT,
 };
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 18 lines · Masahiro Yamada

You can omit .instance_size if it is the same as that of the parent.

.class_size = sizeof(ObjectClass)

... is omitted here, so removing .instance_size is more consistent.

---

 qom/container.c | 1 -
 1 file changed, 1 deletion(-)
qom/container.c +0 -0
index f6ccaf7ea7..4c030d6dda 100644

qom/container.c line 21

Quoted 7 lines
qom/container.c +0 -1
@@ -16,7 +16,6 @@
 
 static const TypeInfo container_info = {
     .name          = "container",
-    .instance_size = sizeof(Object),
     .parent        = TYPE_OBJECT,
 };
 

Queued, thanks.

Paolo