qemu-irix/include
Igor Mammedov 38b5d79b2e qom: add helper macro DEFINE_TYPES()
DEFINE_TYPES() will help to simplify following routine patterns:

 static void foo_register_types(void)
 {
    type_register_static(&foo1_type_info);
    type_register_static(&foo2_type_info);
    ...
 }

 type_init(foo_register_types)

or

 static void foo_register_types(void)
 {
    int i;

    for (i = 0; i < ARRAY_SIZE(type_infos); i++) {
        type_register_static(&type_infos[i]);
    }
 }

 type_init(foo_register_types)

with a single line

 DEFINE_TYPES(type_infos)

where types have static definition which could be consolidated in
a single array of TypeInfo structures.
It saves us ~6-10LOC per use case and would help to replace
imperative foo_register_types() there with declarative style of
type registration.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-10-17 10:34:00 +11:00
..
block nbd patches for 2017-10-14 2017-10-16 15:54:42 +01:00
chardev chardev: remove context in chr_update_read_handler 2017-09-22 21:07:27 +02:00
crypto block: convert qcrypto_block_encrypt|decrypt to take bytes offset 2017-10-06 16:30:47 +02:00
disas
exec util: move qemu_real_host_page_size/mask to osdep.h 2017-10-10 09:45:00 -07:00
fpu
hw pci: conventional-pci-device and pci-express-device interfaces 2017-10-15 05:54:42 +03:00
io io: Reply to ping frames 2017-10-04 13:21:53 +01:00
libdecnumber
migration migration: check pre_save return in vmstate_save_state 2017-09-27 11:36:31 +01:00
monitor
net
qapi
qemu util: move qemu_real_host_page_size/mask to osdep.h 2017-10-10 09:45:00 -07:00
qom qom: add helper macro DEFINE_TYPES() 2017-10-17 10:34:00 +11:00
scsi scsi: add multipath support to qemu-pr-helper 2017-09-22 21:07:27 +02:00
standard-headers linux-headers: sync against v4.14-rc1 2017-09-29 10:58:31 +02:00
sysemu pc, pci, virtio: fixes, features 2017-10-16 17:29:16 +01:00
ui egl: misc framebuffer helper improvements. 2017-09-29 10:36:33 +02:00
elf.h
glib-compat.h glib-compat: move G_SOURCE_CONTINUE/REMOVE there 2017-10-10 16:33:55 +02:00
qemu-common.h
qemu-io.h
trace-tcg.h