@@ -27,8 +27,8 @@
#define TYPE_QAUTHZ_LIST "authz-list"
-OBJECT_DECLARE_TYPE(QAuthZList, QAuthZListClass,
- qauthz_list, QAUTHZ_LIST)
+OBJECT_DECLARE_SIMPLE_TYPE(QAuthZList, qauthz_list,
+ QAUTHZ_LIST, QAuthZClass)
@@ -68,9 +68,6 @@ struct QAuthZList {
};
-struct QAuthZListClass {
- QAuthZClass parent_class;
-};
QAuthZList *qauthz_list_new(const char *id,
@@ -27,8 +27,8 @@
#define TYPE_QAUTHZ_LIST_FILE "authz-list-file"
-OBJECT_DECLARE_TYPE(QAuthZListFile, QAuthZListFileClass,
- qauthz_list_file, QAUTHZ_LIST_FILE)
+OBJECT_DECLARE_SIMPLE_TYPE(QAuthZListFile, qauthz_list_file,
+ QAUTHZ_LIST_FILE, QAuthZClass)
@@ -87,9 +87,6 @@ struct QAuthZListFile {
};
-struct QAuthZListFileClass {
- QAuthZClass parent_class;
-};
QAuthZListFile *qauthz_list_file_new(const char *id,
@@ -27,8 +27,8 @@
#define TYPE_QAUTHZ_PAM "authz-pam"
-OBJECT_DECLARE_TYPE(QAuthZPAM, QAuthZPAMClass,
- qauthz_pam, QAUTHZ_PAM)
+OBJECT_DECLARE_SIMPLE_TYPE(QAuthZPAM, qauthz_pam,
+ QAUTHZ_PAM, QAuthZClass)
@@ -79,9 +79,6 @@ struct QAuthZPAM {
};
-struct QAuthZPAMClass {
- QAuthZClass parent_class;
-};
QAuthZPAM *qauthz_pam_new(const char *id,
@@ -26,8 +26,8 @@
#define TYPE_QAUTHZ_SIMPLE "authz-simple"
-OBJECT_DECLARE_TYPE(QAuthZSimple, QAuthZSimpleClass,
- qauthz_simple, QAUTHZ_SIMPLE)
+OBJECT_DECLARE_SIMPLE_TYPE(QAuthZSimple, qauthz_simple,
+ QAUTHZ_SIMPLE, QAuthZClass)
@@ -62,9 +62,6 @@ struct QAuthZSimple {
};
-struct QAuthZSimpleClass {
- QAuthZClass parent_class;
-};
QAuthZSimple *qauthz_simple_new(const char *id,
@@ -26,8 +26,8 @@
#include "crypto/secret_common.h"
#define TYPE_QCRYPTO_SECRET_KEYRING "secret_keyring"
-OBJECT_DECLARE_TYPE(QCryptoSecretKeyring, QCryptoSecretKeyringClass,
- qcrypto_secret_keyring, QCRYPTO_SECRET_KEYRING)
+OBJECT_DECLARE_SIMPLE_TYPE(QCryptoSecretKeyring, qcrypto_secret_keyring,
+ QCRYPTO_SECRET_KEYRING, QCryptoSecretCommonClass)
struct QCryptoSecretKeyring {
@@ -36,8 +36,5 @@ struct QCryptoSecretKeyring {
};
-struct QCryptoSecretKeyringClass {
- QCryptoSecretCommonClass parent;
-};
#endif /* QCRYPTO_SECRET_KEYRING_H */
@@ -26,8 +26,8 @@
#include "io/task.h"
#define TYPE_QIO_DNS_RESOLVER "qio-dns-resolver"
-OBJECT_DECLARE_TYPE(QIODNSResolver, QIODNSResolverClass,
- qio_dns_resolver, QIO_DNS_RESOLVER)
+OBJECT_DECLARE_SIMPLE_TYPE(QIODNSResolver, qio_dns_resolver,
+ QIO_DNS_RESOLVER, ObjectClass)
/**
@@ -133,9 +133,6 @@ struct QIODNSResolver {
Object parent;
};
-struct QIODNSResolverClass {
- ObjectClass parent;
-};
/**
@@ -25,8 +25,8 @@
#include "qom/object.h"
#define TYPE_QIO_NET_LISTENER "qio-net-listener"
-OBJECT_DECLARE_TYPE(QIONetListener, QIONetListenerClass,
- qio_net_listener, QIO_NET_LISTENER)
+OBJECT_DECLARE_SIMPLE_TYPE(QIONetListener, qio_net_listener,
+ QIO_NET_LISTENER, ObjectClass)
typedef void (*QIONetListenerClientFunc)(QIONetListener *listener,
@@ -58,9 +58,6 @@ struct QIONetListener {
GDestroyNotify io_notify;
};
-struct QIONetListenerClass {
- ObjectClass parent;
-};
/**
@@ -22,13 +22,10 @@
#include "io/channel.h"
#define TYPE_VHOST_USER_BACKEND "vhost-user-backend"
-OBJECT_DECLARE_TYPE(VhostUserBackend, VhostUserBackendClass,
- vhost_user_backend, VHOST_USER_BACKEND)
+OBJECT_DECLARE_SIMPLE_TYPE(VhostUserBackend, vhost_user_backend,
+ VHOST_USER_BACKEND, ObjectClass)
-struct VhostUserBackendClass {
- ObjectClass parent_class;
-};
struct VhostUserBackend {
/* private */
@@ -23,12 +23,9 @@
#define TYPE_DBUS_VMSTATE "dbus-vmstate"
-OBJECT_DECLARE_TYPE(DBusVMState, DBusVMStateClass,
- dbus_vmstate, DBUS_VMSTATE)
+OBJECT_DECLARE_SIMPLE_TYPE(DBusVMState, dbus_vmstate,
+ DBUS_VMSTATE, ObjectClass)
-struct DBusVMStateClass {
- ObjectClass parent_class;
-};
struct DBusVMState {
Object parent;
@@ -20,8 +20,8 @@
#include "input-barrier.h"
#define TYPE_INPUT_BARRIER "input-barrier"
-OBJECT_DECLARE_TYPE(InputBarrier, InputBarrierClass,
- input_barrier, INPUT_BARRIER)
+OBJECT_DECLARE_SIMPLE_TYPE(InputBarrier, input_barrier,
+ INPUT_BARRIER, ObjectClass)
#define MAX_HELLO_LENGTH 1024
@@ -44,9 +44,6 @@ struct InputBarrier {
char buffer[MAX_HELLO_LENGTH];
};
-struct InputBarrierClass {
- ObjectClass parent_class;
-};
static const char *cmd_names[] = {
[barrierCmdCNoop] = "CNOP",
@@ -31,8 +31,8 @@ static bool linux_is_button(unsigned int lnx)
}
#define TYPE_INPUT_LINUX "input-linux"
-OBJECT_DECLARE_TYPE(InputLinux, InputLinuxClass,
- input_linux, INPUT_LINUX)
+OBJECT_DECLARE_SIMPLE_TYPE(InputLinux, input_linux,
+ INPUT_LINUX, ObjectClass)
struct InputLinux {
@@ -65,9 +65,6 @@ struct InputLinux {
QTAILQ_ENTRY(InputLinux) next;
};
-struct InputLinuxClass {
- ObjectClass parent_class;
-};
static QTAILQ_HEAD(, InputLinux) inputs = QTAILQ_HEAD_INITIALIZER(inputs);
Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=ObjectDeclareType $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- Changes v1 -> v2: none --- include/authz/list.h | 7 ++----- include/authz/listfile.h | 7 ++----- include/authz/pamacct.h | 7 ++----- include/authz/simple.h | 7 ++----- include/crypto/secret_keyring.h | 7 ++----- include/io/dns-resolver.h | 7 ++----- include/io/net-listener.h | 7 ++----- include/sysemu/vhost-user-backend.h | 7 ++----- backends/dbus-vmstate.c | 7 ++----- ui/input-barrier.c | 7 ++----- ui/input-linux.c | 7 ++----- 11 files changed, 22 insertions(+), 55 deletions(-)