aboutsummaryrefslogtreecommitdiff
path: root/qapi
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 /qapi
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 'qapi')
-rw-r--r--qapi/qapi-dealloc-visitor.c1
-rw-r--r--qapi/qobject-input-visitor.c2
-rw-r--r--qapi/qobject-output-visitor.c2
3 files changed, 5 insertions, 0 deletions
diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c
index c7d5f80..fd23803 100644
--- a/qapi/qapi-dealloc-visitor.c
+++ b/qapi/qapi-dealloc-visitor.c
@@ -14,6 +14,7 @@
#include "qemu/osdep.h"
#include "qapi/dealloc-visitor.h"
+#include "qapi/qmp/qnull.h"
#include "qemu/queue.h"
#include "qemu-common.h"
#include "qapi/visitor-impl.h"
diff --git a/qapi/qobject-input-visitor.c b/qapi/qobject-input-visitor.c
index 8fb34c4..31183dc 100644
--- a/qapi/qobject-input-visitor.c
+++ b/qapi/qobject-input-visitor.c
@@ -22,6 +22,8 @@
#include "qapi/qmp/qjson.h"
#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qerror.h"
+#include "qapi/qmp/qnull.h"
+#include "qapi/qmp/qnum.h"
#include "qemu/cutils.h"
#include "qemu/option.h"
diff --git a/qapi/qobject-output-visitor.c b/qapi/qobject-output-visitor.c
index 6039876..f0cc46b 100644
--- a/qapi/qobject-output-visitor.c
+++ b/qapi/qobject-output-visitor.c
@@ -18,6 +18,8 @@
#include "qemu/queue.h"
#include "qemu-common.h"
#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/qnull.h"
+#include "qapi/qmp/qnum.h"
#include "qapi/qmp/qstring.h"
typedef struct QStackEntry {