aboutsummaryrefslogtreecommitdiff
path: root/include/io
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-08-31 17:07:37 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-09 09:27:11 -0400
commitc821774a3b7ca991d684c3966171d8657f842aea (patch)
tree57b444ef9ee2ac18c63795d00644776ac4b8cc43 /include/io
parentfa34a3c58ae7161463aded42e70bd59c212ed9f4 (diff)
Use OBJECT_DECLARE_TYPE where possible
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é <berrange@redhat.com> 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 <ehabkost@redhat.com>
Diffstat (limited to 'include/io')
-rw-r--r--include/io/channel.h6
-rw-r--r--include/io/dns-resolver.h6
-rw-r--r--include/io/net-listener.h6
3 files changed, 6 insertions, 12 deletions
diff --git a/include/io/channel.h b/include/io/channel.h
index 3ebdc7954f..245479548a 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 96a3186b6b..8ae4857e05 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 93367db291..4f0847ff19 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,