aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-02-01 12:18:39 +0100
committerMarkus Armbruster <armbru@redhat.com>2018-02-09 13:52:15 +0100
commit452fcdbc49c59884c8c284268d64baa24fea11e1 (patch)
tree8c057e6a77d4a83befd74d8a6a6e596f4db7d2d0 /scripts
parent47e6b297e76007c04a1e9c492006fe093d932cd9 (diff)
Include qapi/qmp/qdict.h exactly where needed
This cleanup makes the number of objects depending on qapi/qmp/qdict.h drop from 4550 (out of 4743) to 368 in my "build everything" tree. For qapi/qmp/qobject.h, the number drops from 4552 to 390. While there, separate #include from file comment with a blank line. 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-13-armbru@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qapi-commands.py2
-rw-r--r--scripts/qapi-event.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index 26c56c5062..f89d748ba4 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -294,6 +294,7 @@ fdef.write(mcgen('''
#include "qemu-common.h"
#include "qemu/module.h"
#include "qapi/visitor.h"
+#include "qapi/qmp/qdict.h"
#include "qapi/qobject-output-visitor.h"
#include "qapi/qobject-input-visitor.h"
#include "qapi/dealloc-visitor.h"
@@ -307,7 +308,6 @@ fdef.write(mcgen('''
fdecl.write(mcgen('''
#include "%(prefix)sqapi-types.h"
-#include "qapi/qmp/qdict.h"
#include "qapi/qmp/dispatch.h"
void %(c_prefix)sqmp_init_marshal(QmpCommandList *cmds);
diff --git a/scripts/qapi-event.py b/scripts/qapi-event.py
index 9d7134658d..c710968dc2 100644
--- a/scripts/qapi-event.py
+++ b/scripts/qapi-event.py
@@ -210,6 +210,7 @@ fdef.write(mcgen('''
#include "%(prefix)sqapi-event.h"
#include "%(prefix)sqapi-visit.h"
#include "qapi/error.h"
+#include "qapi/qmp/qdict.h"
#include "qapi/qobject-output-visitor.h"
#include "qapi/qmp-event.h"
@@ -218,7 +219,6 @@ fdef.write(mcgen('''
fdecl.write(mcgen('''
#include "qapi/util.h"
-#include "qapi/qmp/qdict.h"
#include "%(prefix)sqapi-types.h"
''',