From 15280c360e54a65e2c7be1a47bfbe41dce1ef986 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 1 Feb 2018 12:18:36 +0100 Subject: qdict qlist: Make most helper macros functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster Message-Id: <20180201111846.21846-10-armbru@redhat.com> --- tests/test-qobject-input-visitor.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/test-qobject-input-visitor.c') diff --git a/tests/test-qobject-input-visitor.c b/tests/test-qobject-input-visitor.c index 96405991bb..20bf9a5414 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" -- cgit v1.2.1