aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-02-01 12:18:36 +0100
committerMarkus Armbruster <armbru@redhat.com>2018-02-09 13:52:15 +0100
commit15280c360e54a65e2c7be1a47bfbe41dce1ef986 (patch)
treec65fa005a5c83631aa6b7d4b83e4e4667b7dad01 /tests
parent6b67395762a4c8b6ca94364e0a0f616a6470c46a (diff)
downloadqemu-15280c360e54a65e2c7be1a47bfbe41dce1ef986.zip
qemu-15280c360e54a65e2c7be1a47bfbe41dce1ef986.tar.gz
qemu-15280c360e54a65e2c7be1a47bfbe41dce1ef986.tar.bz2
qdict qlist: Make most helper macros functions
The macro expansions of qdict_put_TYPE() and qlist_append_TYPE() need qbool.h, qnull.h, qnum.h and qstring.h to compile. We include qnull.h and qnum.h in the headers, but not qbool.h and qstring.h. Works, because we include those wherever the macros get used. Open-coding these helpers is of dubious value. Turn them into functions and drop the includes from the headers. This cleanup makes the number of objects depending on qapi/qmp/qnum.h from 4551 (out of 4743) to 46 in my "build everything" tree. For qapi/qmp/qnull.h, the number drops from 4552 to 21. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-10-armbru@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/check-qdict.c1
-rw-r--r--tests/check-qjson.c2
-rw-r--r--tests/check-qobject.c2
-rw-r--r--tests/test-qmp-commands.c1
-rw-r--r--tests/test-qmp-event.c1
-rw-r--r--tests/test-qobject-input-visitor.c2
-rw-r--r--tests/test-qobject-output-visitor.c2
7 files changed, 11 insertions, 0 deletions
diff --git a/tests/check-qdict.c b/tests/check-qdict.c
index 3540577..1b11736 100644
--- a/tests/check-qdict.c
+++ b/tests/check-qdict.c
@@ -12,6 +12,7 @@
#include "qemu/osdep.h"
#include "qapi/qmp/qdict.h"
+#include "qapi/qmp/qnum.h"
#include "qapi/qmp/qstring.h"
#include "qapi/error.h"
#include "qemu-common.h"
diff --git a/tests/check-qjson.c b/tests/check-qjson.c
index 7881009..26f5d44 100644
--- a/tests/check-qjson.c
+++ b/tests/check-qjson.c
@@ -17,6 +17,8 @@
#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qjson.h"
#include "qapi/qmp/qlit.h"
+#include "qapi/qmp/qnull.h"
+#include "qapi/qmp/qnum.h"
#include "qemu-common.h"
static void escaped_string(void)
diff --git a/tests/check-qobject.c b/tests/check-qobject.c
index 06b9c6e..9e1e820 100644
--- a/tests/check-qobject.c
+++ b/tests/check-qobject.c
@@ -9,6 +9,8 @@
#include "qemu/osdep.h"
#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/qnull.h"
+#include "qapi/qmp/qnum.h"
#include "qapi/qmp/qstring.h"
#include "qemu-common.h"
diff --git a/tests/test-qmp-commands.c b/tests/test-qmp-commands.c
index 4794d1a..b5a3d88 100644
--- a/tests/test-qmp-commands.c
+++ b/tests/test-qmp-commands.c
@@ -1,6 +1,7 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qapi/qmp/qdict.h"
+#include "qapi/qmp/qnum.h"
#include "qapi/qmp/qstring.h"
#include "test-qmp-commands.h"
#include "qapi/error.h"
diff --git a/tests/test-qmp-event.c b/tests/test-qmp-event.c
index b197dff..cad9477 100644
--- a/tests/test-qmp-event.c
+++ b/tests/test-qmp-event.c
@@ -18,6 +18,7 @@
#include "test-qapi-event.h"
#include "qapi/error.h"
#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/qnum.h"
#include "qapi/qmp/qobject.h"
#include "qapi/qmp/qstring.h"
#include "qapi/qmp-event.h"
diff --git a/tests/test-qobject-input-visitor.c b/tests/test-qobject-input-visitor.c
index 9640599..20bf9a5 100644
--- a/tests/test-qobject-input-visitor.c
+++ b/tests/test-qobject-input-visitor.c
@@ -18,6 +18,8 @@
#include "qapi/qobject-input-visitor.h"
#include "test-qapi-visit.h"
#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/qnull.h"
+#include "qapi/qmp/qnum.h"
#include "qapi/qmp/qjson.h"
#include "test-qmp-introspect.h"
#include "qmp-introspect.h"
diff --git a/tests/test-qobject-output-visitor.c b/tests/test-qobject-output-visitor.c
index a0b7fe6..4a24e12 100644
--- a/tests/test-qobject-output-visitor.c
+++ b/tests/test-qobject-output-visitor.c
@@ -17,6 +17,8 @@
#include "qapi/qobject-output-visitor.h"
#include "test-qapi-visit.h"
#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/qnull.h"
+#include "qapi/qmp/qnum.h"
#include "qapi/qmp/qjson.h"
typedef struct TestOutputVisitorData {