aboutsummaryrefslogtreecommitdiff
path: root/include/io
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-08-31 17:07:33 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-09 09:27:09 -0400
commit8110fa1d94f2997badc2af39231a1d279c5bb1ee (patch)
tree6bff28c7907dfb0cbb367ca113f4d02ea03f3a51 /include/io
parentdb1015e92e04835c9eb50c29625fe566d1202dbd (diff)
Use DECLARE_*CHECKER* macros
Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]') Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-12-ehabkost@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-13-ehabkost@redhat.com> Message-Id: <20200831210740.126168-14-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/io')
-rw-r--r--include/io/channel-buffer.h4
-rw-r--r--include/io/channel-command.h4
-rw-r--r--include/io/channel-file.h4
-rw-r--r--include/io/channel-socket.h4
-rw-r--r--include/io/channel-tls.h4
-rw-r--r--include/io/channel-websock.h4
-rw-r--r--include/io/channel.h8
-rw-r--r--include/io/dns-resolver.h8
-rw-r--r--include/io/net-listener.h8
9 files changed, 18 insertions, 30 deletions
diff --git a/include/io/channel-buffer.h b/include/io/channel-buffer.h
index 344d5957fd..89632ef437 100644
--- a/include/io/channel-buffer.h
+++ b/include/io/channel-buffer.h
@@ -26,8 +26,8 @@
#define TYPE_QIO_CHANNEL_BUFFER "qio-channel-buffer"
typedef struct QIOChannelBuffer QIOChannelBuffer;
-#define QIO_CHANNEL_BUFFER(obj) \
- OBJECT_CHECK(QIOChannelBuffer, (obj), TYPE_QIO_CHANNEL_BUFFER)
+DECLARE_INSTANCE_CHECKER(QIOChannelBuffer, QIO_CHANNEL_BUFFER,
+ TYPE_QIO_CHANNEL_BUFFER)
/**
diff --git a/include/io/channel-command.h b/include/io/channel-command.h
index b1671062d0..4b64ff011b 100644
--- a/include/io/channel-command.h
+++ b/include/io/channel-command.h
@@ -26,8 +26,8 @@
#define TYPE_QIO_CHANNEL_COMMAND "qio-channel-command"
typedef struct QIOChannelCommand QIOChannelCommand;
-#define QIO_CHANNEL_COMMAND(obj) \
- OBJECT_CHECK(QIOChannelCommand, (obj), TYPE_QIO_CHANNEL_COMMAND)
+DECLARE_INSTANCE_CHECKER(QIOChannelCommand, QIO_CHANNEL_COMMAND,
+ TYPE_QIO_CHANNEL_COMMAND)
diff --git a/include/io/channel-file.h b/include/io/channel-file.h
index d91c9f5bc1..c6caf179d9 100644
--- a/include/io/channel-file.h
+++ b/include/io/channel-file.h
@@ -26,8 +26,8 @@
#define TYPE_QIO_CHANNEL_FILE "qio-channel-file"
typedef struct QIOChannelFile QIOChannelFile;
-#define QIO_CHANNEL_FILE(obj) \
- OBJECT_CHECK(QIOChannelFile, (obj), TYPE_QIO_CHANNEL_FILE)
+DECLARE_INSTANCE_CHECKER(QIOChannelFile, QIO_CHANNEL_FILE,
+ TYPE_QIO_CHANNEL_FILE)
/**
diff --git a/include/io/channel-socket.h b/include/io/channel-socket.h
index ee898d991b..62e3e2e970 100644
--- a/include/io/channel-socket.h
+++ b/include/io/channel-socket.h
@@ -28,8 +28,8 @@
#define TYPE_QIO_CHANNEL_SOCKET "qio-channel-socket"
typedef struct QIOChannelSocket QIOChannelSocket;
-#define QIO_CHANNEL_SOCKET(obj) \
- OBJECT_CHECK(QIOChannelSocket, (obj), TYPE_QIO_CHANNEL_SOCKET)
+DECLARE_INSTANCE_CHECKER(QIOChannelSocket, QIO_CHANNEL_SOCKET,
+ TYPE_QIO_CHANNEL_SOCKET)
/**
diff --git a/include/io/channel-tls.h b/include/io/channel-tls.h
index ebd42f981e..036bf54195 100644
--- a/include/io/channel-tls.h
+++ b/include/io/channel-tls.h
@@ -28,8 +28,8 @@
#define TYPE_QIO_CHANNEL_TLS "qio-channel-tls"
typedef struct QIOChannelTLS QIOChannelTLS;
-#define QIO_CHANNEL_TLS(obj) \
- OBJECT_CHECK(QIOChannelTLS, (obj), TYPE_QIO_CHANNEL_TLS)
+DECLARE_INSTANCE_CHECKER(QIOChannelTLS, QIO_CHANNEL_TLS,
+ TYPE_QIO_CHANNEL_TLS)
/**
diff --git a/include/io/channel-websock.h b/include/io/channel-websock.h
index 5ab8811306..b07eddabe1 100644
--- a/include/io/channel-websock.h
+++ b/include/io/channel-websock.h
@@ -28,8 +28,8 @@
#define TYPE_QIO_CHANNEL_WEBSOCK "qio-channel-websock"
typedef struct QIOChannelWebsock QIOChannelWebsock;
-#define QIO_CHANNEL_WEBSOCK(obj) \
- OBJECT_CHECK(QIOChannelWebsock, (obj), TYPE_QIO_CHANNEL_WEBSOCK)
+DECLARE_INSTANCE_CHECKER(QIOChannelWebsock, QIO_CHANNEL_WEBSOCK,
+ TYPE_QIO_CHANNEL_WEBSOCK)
typedef union QIOChannelWebsockMask QIOChannelWebsockMask;
diff --git a/include/io/channel.h b/include/io/channel.h
index 67b9768eff..3ebdc7954f 100644
--- a/include/io/channel.h
+++ b/include/io/channel.h
@@ -28,12 +28,8 @@
#define TYPE_QIO_CHANNEL "qio-channel"
typedef struct QIOChannel QIOChannel;
typedef struct QIOChannelClass QIOChannelClass;
-#define QIO_CHANNEL(obj) \
- OBJECT_CHECK(QIOChannel, (obj), TYPE_QIO_CHANNEL)
-#define QIO_CHANNEL_CLASS(klass) \
- OBJECT_CLASS_CHECK(QIOChannelClass, klass, TYPE_QIO_CHANNEL)
-#define QIO_CHANNEL_GET_CLASS(obj) \
- OBJECT_GET_CLASS(QIOChannelClass, obj, TYPE_QIO_CHANNEL)
+DECLARE_OBJ_CHECKERS(QIOChannel, QIOChannelClass,
+ QIO_CHANNEL, TYPE_QIO_CHANNEL)
#define QIO_CHANNEL_ERR_BLOCK -2
diff --git a/include/io/dns-resolver.h b/include/io/dns-resolver.h
index 5e720bf267..96a3186b6b 100644
--- a/include/io/dns-resolver.h
+++ b/include/io/dns-resolver.h
@@ -28,12 +28,8 @@
#define TYPE_QIO_DNS_RESOLVER "qio-dns-resolver"
typedef struct QIODNSResolver QIODNSResolver;
typedef struct QIODNSResolverClass QIODNSResolverClass;
-#define QIO_DNS_RESOLVER(obj) \
- OBJECT_CHECK(QIODNSResolver, (obj), TYPE_QIO_DNS_RESOLVER)
-#define QIO_DNS_RESOLVER_CLASS(klass) \
- OBJECT_CLASS_CHECK(QIODNSResolverClass, klass, TYPE_QIO_DNS_RESOLVER)
-#define QIO_DNS_RESOLVER_GET_CLASS(obj) \
- OBJECT_GET_CLASS(QIODNSResolverClass, obj, TYPE_QIO_DNS_RESOLVER)
+DECLARE_OBJ_CHECKERS(QIODNSResolver, QIODNSResolverClass,
+ QIO_DNS_RESOLVER, TYPE_QIO_DNS_RESOLVER)
/**
diff --git a/include/io/net-listener.h b/include/io/net-listener.h
index fbdd2dbf9a..93367db291 100644
--- a/include/io/net-listener.h
+++ b/include/io/net-listener.h
@@ -27,12 +27,8 @@
#define TYPE_QIO_NET_LISTENER "qio-net-listener"
typedef struct QIONetListener QIONetListener;
typedef struct QIONetListenerClass QIONetListenerClass;
-#define QIO_NET_LISTENER(obj) \
- OBJECT_CHECK(QIONetListener, (obj), TYPE_QIO_NET_LISTENER)
-#define QIO_NET_LISTENER_CLASS(klass) \
- OBJECT_CLASS_CHECK(QIONetListenerClass, klass, TYPE_QIO_NET_LISTENER)
-#define QIO_NET_LISTENER_GET_CLASS(obj) \
- OBJECT_GET_CLASS(QIONetListenerClass, obj, TYPE_QIO_NET_LISTENER)
+DECLARE_OBJ_CHECKERS(QIONetListener, QIONetListenerClass,
+ QIO_NET_LISTENER, TYPE_QIO_NET_LISTENER)
typedef void (*QIONetListenerClientFunc)(QIONetListener *listener,