]> git.proxmox.com Git - mirror_qemu.git/commit
qdict qlist: Make most helper macros functions
authorMarkus Armbruster <armbru@redhat.com>
Thu, 1 Feb 2018 11:18:36 +0000 (12:18 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 9 Feb 2018 12:52:15 +0000 (13:52 +0100)
commit15280c360e54a65e2c7be1a47bfbe41dce1ef986
treec65fa005a5c83631aa6b7d4b83e4e4667b7dad01
parent6b67395762a4c8b6ca94364e0a0f616a6470c46a
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>
27 files changed:
block/qapi.c
blockdev.c
hw/i386/acpi-build.c
hw/ppc/spapr_drc.c
include/qapi/qmp/qdict.h
include/qapi/qmp/qlist.h
migration/migration.c
monitor.c
qapi/qapi-dealloc-visitor.c
qapi/qobject-input-visitor.c
qapi/qobject-output-visitor.c
qobject/json-parser.c
qobject/qdict.c
qobject/qjson.c
qobject/qlist.c
qobject/qlit.c
qobject/qobject.c
qom/object.c
target/ppc/translate.c
tests/check-qdict.c
tests/check-qjson.c
tests/check-qobject.c
tests/test-qmp-commands.c
tests/test-qmp-event.c
tests/test-qobject-input-visitor.c
tests/test-qobject-output-visitor.c
util/qemu-option.c