qemu/include
Eric Blake 9812e7125b qapi: Add QAPI_LIST_PREPEND() macro
block.c has a useful macro QAPI_LIST_ADD() for inserting at the front
of any QAPI-generated list; move it from block.c to qapi/util.h so
more places can use it, including one earlier place in block.c, and
rename it to something more obvious (since we also have a lot of
places that append, rather than prepend, to a list).

There are many more places in the codebase that can benefit from using
the macro, but converting them will be left to later patches.

In theory, all QAPI list types are child classes of GenericList; but
in practice, that relationship is not explicitly spelled out in the C
type declarations (rather, it is something that happens implicitly due
to C compatible layouts), and the macro does not actually depend on
the GenericList type.  We considered moving GenericList from visitor.h
into util.h to group related code; however, such a move would be
awkward if we do not also move GenericAlternate.  Unfortunately,
moving GenericAlternate would introduce its own problems of
declaration circularity (qapi-builtin-types.h needs a complete
definition of QEnumLookup from util.h, but GenericAlternate needs a
complete definition of QType from qapi-builtin-types.h).

Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20201027050556.269064-3-eblake@redhat.com>
[eblake: s/ADD/PREPEND/ per suggestion by Markus]
2020-10-30 15:10:14 -05:00
..
authz qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
block block: End quiescent sections when a BDS is deleted 2020-10-27 15:26:20 +01:00
chardev chardev/spice: simplify chardev setup 2020-10-15 11:14:40 +02:00
crypto qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
disas disas: Split out capstone code to disas/capstone.c 2020-10-03 04:25:14 -05:00
exec linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI 2020-10-27 10:44:02 +00:00
fpu softfloat: Define comparison operations for bfloat16 2020-08-29 19:25:42 -07:00
hw Pull request trivial branch 20201027 2020-10-30 15:49:35 +00:00
io io: Fix Lesser GPL version number 2020-10-27 16:48:49 +01:00
libdecnumber include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
migration migration: Drop unused VMSTATE_FLOAT64 support 2020-10-26 16:15:04 +00:00
monitor monitor: Make current monitor a per-coroutine property 2020-10-09 07:08:19 +02:00
net qom: fix objects with improper parent type 2020-10-12 11:50:22 -04:00
qapi qapi: Add QAPI_LIST_PREPEND() macro 2020-10-30 15:10:14 -05:00
qemu util/vhost-user-server: move header to include/ 2020-10-23 13:42:16 +01:00
qom qom: Add user_creatable_print_help_from_qdict() 2020-10-15 16:06:27 +02:00
scsi scsi-generic: Fix HM-zoned device scan 2020-09-30 19:09:20 +02:00
standard-headers Revert series: virtiofsd: Announce submounts to the guest 2020-10-28 13:17:32 +00:00
sysemu Pull request trivial branch 20201027 2020-10-30 15:49:35 +00:00
tcg tcg: Remove TCGOpDef.used 2020-10-08 05:57:32 -05:00
ui spice: wire up monitor in QemuSpiceOps. 2020-10-21 15:46:14 +02:00
user trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
elf.h target-arm queue: 2020-10-29 11:40:04 +00:00
glib-compat.h glib: bump min required glib library version to 2.48 2019-08-22 10:46:34 +01:00
qemu-common.h vl: relocate paths to data directories 2020-09-30 19:11:36 +02:00
qemu-io.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
trace-tcg.h