]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
qobject: Drop QObject_HEAD
authorMarkus Armbruster <armbru@redhat.com>
Thu, 15 Oct 2015 14:15:32 +0000 (16:15 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 29 Oct 2015 13:34:44 +0000 (14:34 +0100)
QObject_HEAD is a macro expanding into the common part of structs that
are sub-types of QObject.  It's always been just QObject base, and
unlikely to change.  Drop the macro, because the code is clearer with
out it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1444918537-18107-2-git-send-email-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
include/qapi/qmp/qbool.h
include/qapi/qmp/qdict.h
include/qapi/qmp/qfloat.h
include/qapi/qmp/qint.h
include/qapi/qmp/qlist.h
include/qapi/qmp/qobject.h
include/qapi/qmp/qstring.h

index 4aa6be3b3378a77c6f18703f8e7e0cbda6731039..d9256e4268778d06505f076c6a48ad8213d2fb44 100644 (file)
@@ -18,7 +18,7 @@
 #include "qapi/qmp/qobject.h"
 
 typedef struct QBool {
-    QObject_HEAD;
+    QObject base;
     bool value;
 } QBool;
 
index a37f4c1567b12c54150304a565cb975fcbf5e9df..787c658967ce3a42256d4741adaf4f55b48a9e0c 100644 (file)
@@ -28,7 +28,7 @@ typedef struct QDictEntry {
 } QDictEntry;
 
 typedef struct QDict {
-    QObject_HEAD;
+    QObject base;
     size_t size;
     QLIST_HEAD(,QDictEntry) table[QDICT_BUCKET_MAX];
 } QDict;
index a8658443dc206518a4748fe64f5c6757bc876485..46745e50d146ae86011a88b55571605c389085ad 100644 (file)
@@ -18,7 +18,7 @@
 #include "qapi/qmp/qobject.h"
 
 typedef struct QFloat {
-    QObject_HEAD;
+    QObject base;
     double value;
 } QFloat;
 
index 48a41b0f2aed45bfc90e3d6838e204728bc2ee58..339a9abb8fbe860b28b6fda83806bf20c899d720 100644 (file)
@@ -17,7 +17,7 @@
 #include "qapi/qmp/qobject.h"
 
 typedef struct QInt {
-    QObject_HEAD;
+    QObject base;
     int64_t value;
 } QInt;
 
index 6cc4831df3edbdcbdae6614ad5c5ddb275923c4a..b1bf7852c5e4917465f34d85eecafa02fae5d2d3 100644 (file)
@@ -22,7 +22,7 @@ typedef struct QListEntry {
 } QListEntry;
 
 typedef struct QList {
-    QObject_HEAD;
+    QObject base;
     QTAILQ_HEAD(,QListEntry) head;
 } QList;
 
index 260d2ed3cc9dc9c91b3070aceb2b199e7abd6f57..c856f553b7efb8873431cc03350cb63d16bda0d4 100644 (file)
@@ -59,10 +59,6 @@ typedef struct QObject {
     size_t refcnt;
 } QObject;
 
-/* Objects definitions must include this */
-#define QObject_HEAD  \
-    QObject base
-
 /* Get the 'base' part of an object */
 #define QOBJECT(obj) (&(obj)->base)
 
index 1bc3666107ca766814aa11e1b6838da30b920a59..34675a7fc03827780b18ba3265b2e63f6cd6ed98 100644 (file)
@@ -17,7 +17,7 @@
 #include "qapi/qmp/qobject.h"
 
 typedef struct QString {
-    QObject_HEAD;
+    QObject base;
     char *string;
     size_t length;
     size_t capacity;