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] [PATCH 06/18] Typedef the subtypes of QObject in qemu/typedefs.h, too
Date: Tue, 30 Jan 2018 11:21:50 +0100	[thread overview]
Message-ID: <20180130102202.28519-7-armbru@redhat.com> (raw)
In-Reply-To: <20180130102202.28519-1-armbru@redhat.com>

This renders many inclusions of qapi/qmp/q*.h superfluous.  They'll be
dropped in the next few commits.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 include/qapi/qmp/qbool.h   | 4 ++--
 include/qapi/qmp/qdict.h   | 4 ++--
 include/qapi/qmp/qlist.h   | 4 ++--
 include/qapi/qmp/qnum.h    | 4 ++--
 include/qapi/qmp/qstring.h | 4 ++--
 include/qemu/typedefs.h    | 7 ++++++-
 6 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/include/qapi/qmp/qbool.h b/include/qapi/qmp/qbool.h
index f77ea86c4e..629c508d34 100644
--- a/include/qapi/qmp/qbool.h
+++ b/include/qapi/qmp/qbool.h
@@ -16,10 +16,10 @@
 
 #include "qapi/qmp/qobject.h"
 
-typedef struct QBool {
+struct QBool {
     QObject base;
     bool value;
-} QBool;
+};
 
 QBool *qbool_from_bool(bool value);
 bool qbool_get_bool(const QBool *qb);
diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h
index fc218e7be6..d0c298114e 100644
--- a/include/qapi/qmp/qdict.h
+++ b/include/qapi/qmp/qdict.h
@@ -27,11 +27,11 @@ typedef struct QDictEntry {
     QLIST_ENTRY(QDictEntry) next;
 } QDictEntry;
 
-typedef struct QDict {
+struct QDict {
     QObject base;
     size_t size;
     QLIST_HEAD(,QDictEntry) table[QDICT_BUCKET_MAX];
-} QDict;
+};
 
 /* Object API */
 QDict *qdict_new(void);
diff --git a/include/qapi/qmp/qlist.h b/include/qapi/qmp/qlist.h
index ec3fcc1a4c..632b7ef2c1 100644
--- a/include/qapi/qmp/qlist.h
+++ b/include/qapi/qmp/qlist.h
@@ -23,10 +23,10 @@ typedef struct QListEntry {
     QTAILQ_ENTRY(QListEntry) next;
 } QListEntry;
 
-typedef struct QList {
+struct QList {
     QObject base;
     QTAILQ_HEAD(,QListEntry) head;
-} QList;
+};
 
 #define qlist_append(qlist, obj) \
         qlist_append_obj(qlist, QOBJECT(obj))
diff --git a/include/qapi/qmp/qnum.h b/include/qapi/qmp/qnum.h
index c3d86794bb..15e3971c7f 100644
--- a/include/qapi/qmp/qnum.h
+++ b/include/qapi/qmp/qnum.h
@@ -44,7 +44,7 @@ typedef enum {
  * in range: qnum_get_try_int() / qnum_get_try_uint() check range and
  * convert under the hood.
  */
-typedef struct QNum {
+struct QNum {
     QObject base;
     QNumKind kind;
     union {
@@ -52,7 +52,7 @@ typedef struct QNum {
         uint64_t u64;
         double dbl;
     } u;
-} QNum;
+};
 
 QNum *qnum_from_int(int64_t value);
 QNum *qnum_from_uint(uint64_t value);
diff --git a/include/qapi/qmp/qstring.h b/include/qapi/qmp/qstring.h
index 65c05a9be5..98070ef3d6 100644
--- a/include/qapi/qmp/qstring.h
+++ b/include/qapi/qmp/qstring.h
@@ -15,12 +15,12 @@
 
 #include "qapi/qmp/qobject.h"
 
-typedef struct QString {
+struct QString {
     QObject base;
     char *string;
     size_t length;
     size_t capacity;
-} QString;
+};
 
 QString *qstring_new(void);
 QString *qstring_from_str(const char *str);
diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index 9bd7a834ba..78e2f08c0b 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -92,8 +92,13 @@ typedef struct QemuOptsList QemuOptsList;
 typedef struct QEMUSGList QEMUSGList;
 typedef struct QEMUTimer QEMUTimer;
 typedef struct QEMUTimerListGroup QEMUTimerListGroup;
-typedef struct QObject QObject;
+typedef struct QBool QBool;
+typedef struct QDict QDict;
+typedef struct QList QList;
 typedef struct QNull QNull;
+typedef struct QNum QNum;
+typedef struct QObject QObject;
+typedef struct QString QString;
 typedef struct RAMBlock RAMBlock;
 typedef struct Range Range;
 typedef struct SerialState SerialState;
-- 
2.13.6

  parent reply	other threads:[~2018-01-30 10:22 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 10:21 [Qemu-devel] [PATCH 00/18] Clean up includes to reduce compile time Markus Armbruster
2018-01-30 10:21 ` [Qemu-devel] [PATCH 01/18] Clean up includes Markus Armbruster
2018-01-30 13:22   ` BALATON Zoltan
2018-01-31  7:48     ` Markus Armbruster
2018-01-30 15:23   ` Eric Blake
2018-01-30 10:21 ` [Qemu-devel] [PATCH 02/18] Drop superfluous includes of qapi-types.h Markus Armbruster
2018-01-30 15:46   ` Eric Blake
2018-01-31  7:49     ` Markus Armbruster
2018-01-30 10:21 ` [Qemu-devel] [PATCH 03/18] Include qapi/error.h exactly where needed Markus Armbruster
2018-01-30 16:14   ` Eric Blake
2018-01-31  7:58     ` Markus Armbruster
2018-01-30 10:21 ` [Qemu-devel] [PATCH 04/18] Drop superfluous includes of qapi/qmp/qerror.h Markus Armbruster
2018-01-30 16:20   ` Eric Blake
2018-01-30 10:21 ` [Qemu-devel] [PATCH 05/18] Include qmp-commands.h exactly where needed Markus Armbruster
2018-01-30 16:43   ` Eric Blake
2018-01-30 10:21 ` Markus Armbruster [this message]
2018-01-30 16:50   ` [Qemu-devel] [PATCH 06/18] Typedef the subtypes of QObject in qemu/typedefs.h, too Eric Blake
2018-01-30 10:21 ` [Qemu-devel] [PATCH 07/18] Eliminate qapi/qmp/types.h Markus Armbruster
2018-01-30 16:56   ` Eric Blake
2018-01-30 10:21 ` [Qemu-devel] [PATCH 08/18] qdict qlist: Make most helper macros functions Markus Armbruster
2018-01-30 17:02   ` Eric Blake
2018-01-31  8:11     ` Markus Armbruster
2018-01-30 10:21 ` [Qemu-devel] [PATCH 09/18] Include qapi/qmp/qobject.h exactly where needed Markus Armbruster
2018-01-30 17:03   ` Eric Blake
2018-01-30 10:21 ` [Qemu-devel] [PATCH 10/18] Include qapi/qmp/qlist.h " Markus Armbruster
2018-01-30 17:47   ` Eric Blake
2018-01-30 10:21 ` [Qemu-devel] [PATCH 11/18] Include qapi/qmp/qdict.h " Markus Armbruster
2018-01-30 17:51   ` Eric Blake
2018-01-30 10:21 ` [Qemu-devel] [PATCH 12/18] Include qapi/qmp/qstring.h " Markus Armbruster
2018-01-30 17:55   ` Eric Blake
2018-01-30 10:21 ` [Qemu-devel] [PATCH 13/18] Include qapi/qmp/qbool.h " Markus Armbruster
2018-01-30 17:57   ` Eric Blake
2018-01-30 10:21 ` [Qemu-devel] [PATCH 14/18] Include qapi/qmp/qnum.h " Markus Armbruster
2018-01-30 17:58   ` Eric Blake
2018-01-30 10:21 ` [Qemu-devel] [PATCH 15/18] Include qapi/qmp/qnull.h " Markus Armbruster
2018-01-30 17:59   ` Eric Blake
2018-01-30 10:22 ` [Qemu-devel] [PATCH 16/18] Drop superfluous includes of qapi/qmp/dispatch.h Markus Armbruster
2018-01-30 18:00   ` Eric Blake
2018-01-30 10:22 ` [Qemu-devel] [PATCH 17/18] Drop superfluous includes of qapi/qmp/qjson.h Markus Armbruster
2018-01-30 18:01   ` Eric Blake
2018-01-30 10:22 ` [Qemu-devel] [PATCH 18/18] Move include qemu/option.h from qemu-common.h to actual users Markus Armbruster
2018-01-30 18:08   ` Eric Blake
2018-01-31  8:14     ` Markus Armbruster
2018-01-30 13:39 ` [Qemu-devel] [PATCH 00/18] Clean up includes to reduce compile time no-reply
2018-01-30 18:36 ` Philippe Mathieu-Daudé
2018-01-31  8:31   ` Markus Armbruster
2018-01-31  0:12 ` no-reply
2018-01-31  7:10 ` Thomas Huth
2018-01-31 14:00   ` 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=20180130102202.28519-7-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).