qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 01/13] qobject: Drop QObject_HEAD
Date: Tue, 27 Oct 2015 10:21:35 +0100	[thread overview]
Message-ID: <1445937707-22768-2-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1445937707-22768-1-git-send-email-armbru@redhat.com>

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   | 2 +-
 include/qapi/qmp/qdict.h   | 2 +-
 include/qapi/qmp/qfloat.h  | 2 +-
 include/qapi/qmp/qint.h    | 2 +-
 include/qapi/qmp/qlist.h   | 2 +-
 include/qapi/qmp/qobject.h | 4 ----
 include/qapi/qmp/qstring.h | 2 +-
 7 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/include/qapi/qmp/qbool.h b/include/qapi/qmp/qbool.h
index 4aa6be3..d9256e4 100644
--- a/include/qapi/qmp/qbool.h
+++ b/include/qapi/qmp/qbool.h
@@ -18,7 +18,7 @@
 #include "qapi/qmp/qobject.h"
 
 typedef struct QBool {
-    QObject_HEAD;
+    QObject base;
     bool value;
 } QBool;
 
diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h
index a37f4c1..787c658 100644
--- a/include/qapi/qmp/qdict.h
+++ b/include/qapi/qmp/qdict.h
@@ -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;
diff --git a/include/qapi/qmp/qfloat.h b/include/qapi/qmp/qfloat.h
index a865844..46745e5 100644
--- a/include/qapi/qmp/qfloat.h
+++ b/include/qapi/qmp/qfloat.h
@@ -18,7 +18,7 @@
 #include "qapi/qmp/qobject.h"
 
 typedef struct QFloat {
-    QObject_HEAD;
+    QObject base;
     double value;
 } QFloat;
 
diff --git a/include/qapi/qmp/qint.h b/include/qapi/qmp/qint.h
index 48a41b0..339a9ab 100644
--- a/include/qapi/qmp/qint.h
+++ b/include/qapi/qmp/qint.h
@@ -17,7 +17,7 @@
 #include "qapi/qmp/qobject.h"
 
 typedef struct QInt {
-    QObject_HEAD;
+    QObject base;
     int64_t value;
 } QInt;
 
diff --git a/include/qapi/qmp/qlist.h b/include/qapi/qmp/qlist.h
index 6cc4831..b1bf785 100644
--- a/include/qapi/qmp/qlist.h
+++ b/include/qapi/qmp/qlist.h
@@ -22,7 +22,7 @@ typedef struct QListEntry {
 } QListEntry;
 
 typedef struct QList {
-    QObject_HEAD;
+    QObject base;
     QTAILQ_HEAD(,QListEntry) head;
 } QList;
 
diff --git a/include/qapi/qmp/qobject.h b/include/qapi/qmp/qobject.h
index 260d2ed..c856f55 100644
--- a/include/qapi/qmp/qobject.h
+++ b/include/qapi/qmp/qobject.h
@@ -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)
 
diff --git a/include/qapi/qmp/qstring.h b/include/qapi/qmp/qstring.h
index 1bc3666..34675a7 100644
--- a/include/qapi/qmp/qstring.h
+++ b/include/qapi/qmp/qstring.h
@@ -17,7 +17,7 @@
 #include "qapi/qmp/qobject.h"
 
 typedef struct QString {
-    QObject_HEAD;
+    QObject base;
     char *string;
     size_t length;
     size_t capacity;
-- 
2.4.3

  reply	other threads:[~2015-10-27  9:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27  9:21 [Qemu-devel] [PULL 00/13] QMP and QObject patches Markus Armbruster
2015-10-27  9:21 ` Markus Armbruster [this message]
2015-10-27  9:21 ` [Qemu-devel] [PULL 02/13] qbool: Make conversion from QObject * accept null Markus Armbruster
2015-10-27  9:21 ` [Qemu-devel] [PULL 03/13] qdict: " Markus Armbruster
2015-10-27  9:21 ` [Qemu-devel] [PULL 04/13] qfloat qint: " Markus Armbruster
2015-10-27  9:21 ` [Qemu-devel] [PULL 05/13] qlist: " Markus Armbruster
2015-10-27  9:21 ` [Qemu-devel] [PULL 06/13] qstring: " Markus Armbruster
2015-10-27  9:21 ` [Qemu-devel] [PULL 07/13] monitor: Reduce casting of QAPI event QDict Markus Armbruster
2015-10-27  9:21 ` [Qemu-devel] [PULL 08/13] monitor: Simplify event throttling Markus Armbruster
2015-10-27  9:21 ` [Qemu-devel] [PULL 09/13] monitor: Switch from timer_new() to timer_new_ns() Markus Armbruster
2015-10-27  9:21 ` [Qemu-devel] [PULL 10/13] monitor: Split MonitorQAPIEventConf off MonitorQAPIEventState Markus Armbruster
2015-10-27  9:21 ` [Qemu-devel] [PULL 11/13] monitor: Turn monitor_qapi_event_state[] into a hash table Markus Armbruster
2015-10-27  9:21 ` [Qemu-devel] [PULL 12/13] monitor: Throttle event VSERPORT_CHANGE separately by "id" Markus Armbruster
2015-10-27  9:21 ` [Qemu-devel] [PULL 13/13] docs: Document QMP event rate limiting Markus Armbruster
2015-10-27 13:06 ` [Qemu-devel] [PULL 00/13] QMP and QObject patches Peter Maydell
2015-10-27 14:28   ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445937707-22768-2-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).