qapi: Improve use of qmp/types.h
authorEric Blake <eblake@redhat.com>
Thu, 9 Jun 2016 16:48:32 +0000 (10:48 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 6 Jul 2016 08:52:03 +0000 (10:52 +0200)
'qjson.h' is not a QObject subtype; include this file directly in
.c files that are using it, rather than abusing qmp/types.h for
that purpose.

Meanwhile, for files that include a list of individual QObject
subtypes, it's easier to just use qmp/types.h for that purpose.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1465490926-28625-2-git-send-email-eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
12 files changed:
hw/pci/pcie_aer.c
include/qapi/qmp/types.h
monitor.c
qapi/qmp-dispatch.c
qobject/json-parser.c
qobject/qjson.c
qobject/qobject.c
tests/check-qjson.c
tests/test-qmp-input-strict.c
tests/test-qmp-input-visitor.c
tests/test-qmp-output-visitor.c
tests/test-visitor-serialization.c

index e2d4e68ba3db2b8a048c8cead7ef082612b24fcd..048ce6a4245569b859015217b11da983dbc12bf4 100644 (file)
@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "sysemu/sysemu.h"
 #include "qapi/qmp/types.h"
+#include "qapi/qmp/qjson.h"
 #include "monitor/monitor.h"
 #include "hw/pci/pci_bridge.h"
 #include "hw/pci/pcie.h"
index 7782ec5a602b6fc031129943ce7ae2ec99d0a9ed..f21ecf48fe226daf9c5fd8b7389c034e952c1da5 100644 (file)
@@ -20,6 +20,5 @@
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qjson.h"
 
 #endif /* QEMU_OBJECTS_H */
index 6f960f13a6059c39713df5ca0562cfc5b8bb0882..ed09cdc26196e90a2bc80735919d9777a522a239 100644 (file)
--- a/monitor.c
+++ b/monitor.c
 #include "qemu/acl.h"
 #include "sysemu/tpm.h"
 #include "qapi/qmp/qerror.h"
-#include "qapi/qmp/qint.h"
-#include "qapi/qmp/qfloat.h"
-#include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qbool.h"
-#include "qapi/qmp/qstring.h"
+#include "qapi/qmp/types.h"
 #include "qapi/qmp/qjson.h"
 #include "qapi/qmp/json-streamer.h"
 #include "qapi/qmp/json-parser.h"
index 08faf853ac74d94cf9781c6539194d84e03364ab..505eb418ac670f929784d72e9dd16f1a85ae047b 100644 (file)
@@ -16,6 +16,7 @@
 #include "qapi/qmp/types.h"
 #include "qapi/qmp/dispatch.h"
 #include "qapi/qmp/json-parser.h"
+#include "qapi/qmp/qjson.h"
 #include "qapi-types.h"
 #include "qapi/qmp/qerror.h"
 
index 67ed727318df6fb893eb79a68d9249c6f653599e..c18e48ab945e9573b044f35181ae59465b262158 100644 (file)
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu-common.h"
-#include "qapi/qmp/qstring.h"
-#include "qapi/qmp/qint.h"
-#include "qapi/qmp/qdict.h"
-#include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qfloat.h"
-#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/types.h"
 #include "qapi/qmp/json-parser.h"
 #include "qapi/qmp/json-lexer.h"
 #include "qapi/qmp/json-streamer.h"
index ef160d2119eb18aa917b71b40e37d54880b1ac7f..9a0de8907984efb76f8f943098d7d0b8a04774fb 100644 (file)
 #include "qapi/qmp/json-parser.h"
 #include "qapi/qmp/json-streamer.h"
 #include "qapi/qmp/qjson.h"
-#include "qapi/qmp/qint.h"
-#include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qbool.h"
-#include "qapi/qmp/qfloat.h"
-#include "qapi/qmp/qdict.h"
+#include "qapi/qmp/types.h"
 #include "qemu/unicode.h"
 
 typedef struct JSONParsingState
index cd41fb940b9b4469acee01bb72d19a16ac8b4da7..fe4fa1098958fa96ca43a92e9ecc6056bd121290 100644 (file)
@@ -9,12 +9,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#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/qstring.h"
+#include "qapi/qmp/types.h"
 
 static void (*qdestroy[QTYPE__MAX])(QObject *) = {
     [QTYPE_NONE] = NULL,               /* No such object exists */
index 0e158f6eac349aa2974ece970cb850e74f471294..85955744eb1a9b4267466e04396c120af6f0d37b 100644 (file)
  */
 #include "qemu/osdep.h"
 
-#include "qapi/qmp/qstring.h"
-#include "qapi/qmp/qint.h"
-#include "qapi/qmp/qdict.h"
-#include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qfloat.h"
-#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/types.h"
 #include "qapi/qmp/qjson.h"
-
 #include "qemu-common.h"
 
 static void escaped_string(void)
index d5f57c583af95acdd13057ba728ce826e5cccba8..79739e9808ba900270bd37f22ceb7934946269ce 100644 (file)
@@ -19,6 +19,7 @@
 #include "test-qapi-types.h"
 #include "test-qapi-visit.h"
 #include "qapi/qmp/types.h"
+#include "qapi/qmp/qjson.h"
 #include "test-qmp-introspect.h"
 #include "qmp-introspect.h"
 #include "qapi-visit.h"
index 1a4585c5538fe4bfc98ca249e15a5a572d11e264..17cda5ad63901eba00c2d34c63ef72187cc112a9 100644 (file)
@@ -18,6 +18,7 @@
 #include "test-qapi-types.h"
 #include "test-qapi-visit.h"
 #include "qapi/qmp/types.h"
+#include "qapi/qmp/qjson.h"
 
 typedef struct TestInputVisitorData {
     QObject *obj;
index f8a7a271a9ff3132d0bb20fd10b636b2890e0a41..e030c67fb460f5ed046ee5fca985f47797b6fa45 100644 (file)
@@ -18,6 +18,7 @@
 #include "test-qapi-types.h"
 #include "test-qapi-visit.h"
 #include "qapi/qmp/types.h"
+#include "qapi/qmp/qjson.h"
 
 typedef struct TestOutputVisitorData {
     QmpOutputVisitor *qov;
index 777469f114d01f474382a8d6dfbcd459240f9b7f..db781c0a790ec3ca8e5c10a89afb9afef0165e29 100644 (file)
@@ -19,6 +19,7 @@
 #include "test-qapi-visit.h"
 #include "qapi/error.h"
 #include "qapi/qmp/types.h"
+#include "qapi/qmp/qjson.h"
 #include "qapi/qmp-input-visitor.h"
 #include "qapi/qmp-output-visitor.h"
 #include "qapi/string-input-visitor.h"