diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-16 14:25:16 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-18 14:12:32 -0400 |
commit | c734cd40a10943753a4d015c9d0a6c08c8f0159e (patch) | |
tree | f3a0e5e0152e85da0f0d0bc4bb48eef2198867c4 /io | |
parent | 4a15e5bef8ec4322d4192dc4ab0b6149d415b990 (diff) | |
download | qemu-c734cd40a10943753a4d015c9d0a6c08c8f0159e.zip qemu-c734cd40a10943753a4d015c9d0a6c08c8f0159e.tar.gz qemu-c734cd40a10943753a4d015c9d0a6c08c8f0159e.tar.bz2 |
qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE
The requirement to specify the parent class type makes the macro
harder to use and easy to misuse (silent bugs can be introduced
if the wrong struct type is specified).
Simplify the macro by just not declaring any class struct,
allowing us to remove the class_size field from the TypeInfo
variables for those types.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200916182519.415636-3-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'io')
-rw-r--r-- | io/dns-resolver.c | 1 | ||||
-rw-r--r-- | io/net-listener.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/io/dns-resolver.c b/io/dns-resolver.c index 6ebe2a5..b55d8cc 100644 --- a/io/dns-resolver.c +++ b/io/dns-resolver.c @@ -267,7 +267,6 @@ static const TypeInfo qio_dns_resolver_info = { .parent = TYPE_OBJECT, .name = TYPE_QIO_DNS_RESOLVER, .instance_size = sizeof(QIODNSResolver), - .class_size = sizeof(QIODNSResolverClass), }; diff --git a/io/net-listener.c b/io/net-listener.c index 5d8a226..46c2643 100644 --- a/io/net-listener.c +++ b/io/net-listener.c @@ -307,7 +307,6 @@ static const TypeInfo qio_net_listener_info = { .name = TYPE_QIO_NET_LISTENER, .instance_size = sizeof(QIONetListener), .instance_finalize = qio_net_listener_finalize, - .class_size = sizeof(QIONetListenerClass), }; |