From c821774a3b7ca991d684c3966171d8657f842aea Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Mon, 31 Aug 2020 17:07:37 -0400 Subject: Use OBJECT_DECLARE_TYPE where possible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace DECLARE_OBJ_CHECKERS with OBJECT_DECLARE_TYPE where the typedefs can be safely removed. Generated running: $ ./scripts/codeconverter/converter.py -i \ --pattern=DeclareObjCheckers $(git grep -l '' -- '*.[ch]') Reviewed-by: Daniel P. Berrangé Message-Id: <20200831210740.126168-16-ehabkost@redhat.com> Message-Id: <20200831210740.126168-17-ehabkost@redhat.com> Message-Id: <20200831210740.126168-18-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- include/io/channel.h | 6 ++---- include/io/dns-resolver.h | 6 ++---- include/io/net-listener.h | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) (limited to 'include/io') diff --git a/include/io/channel.h b/include/io/channel.h index 3ebdc79..2454795 100644 --- a/include/io/channel.h +++ b/include/io/channel.h @@ -26,10 +26,8 @@ #include "block/aio.h" #define TYPE_QIO_CHANNEL "qio-channel" -typedef struct QIOChannel QIOChannel; -typedef struct QIOChannelClass QIOChannelClass; -DECLARE_OBJ_CHECKERS(QIOChannel, QIOChannelClass, - QIO_CHANNEL, TYPE_QIO_CHANNEL) +OBJECT_DECLARE_TYPE(QIOChannel, QIOChannelClass, + qio_channel, QIO_CHANNEL) #define QIO_CHANNEL_ERR_BLOCK -2 diff --git a/include/io/dns-resolver.h b/include/io/dns-resolver.h index 96a3186..8ae4857 100644 --- a/include/io/dns-resolver.h +++ b/include/io/dns-resolver.h @@ -26,10 +26,8 @@ #include "io/task.h" #define TYPE_QIO_DNS_RESOLVER "qio-dns-resolver" -typedef struct QIODNSResolver QIODNSResolver; -typedef struct QIODNSResolverClass QIODNSResolverClass; -DECLARE_OBJ_CHECKERS(QIODNSResolver, QIODNSResolverClass, - QIO_DNS_RESOLVER, TYPE_QIO_DNS_RESOLVER) +OBJECT_DECLARE_TYPE(QIODNSResolver, QIODNSResolverClass, + qio_dns_resolver, QIO_DNS_RESOLVER) /** diff --git a/include/io/net-listener.h b/include/io/net-listener.h index 93367db..4f0847f 100644 --- a/include/io/net-listener.h +++ b/include/io/net-listener.h @@ -25,10 +25,8 @@ #include "qom/object.h" #define TYPE_QIO_NET_LISTENER "qio-net-listener" -typedef struct QIONetListener QIONetListener; -typedef struct QIONetListenerClass QIONetListenerClass; -DECLARE_OBJ_CHECKERS(QIONetListener, QIONetListenerClass, - QIO_NET_LISTENER, TYPE_QIO_NET_LISTENER) +OBJECT_DECLARE_TYPE(QIONetListener, QIONetListenerClass, + qio_net_listener, QIO_NET_LISTENER) typedef void (*QIONetListenerClientFunc)(QIONetListener *listener, -- cgit v1.1