mirror of https://gitee.com/openkylin/qemu.git
7746abd8e9
Currently the ObjectProperty iterator API works as follows: ObjectPropertyIterator *iter; iter = object_property_iter_init(obj); while ((prop = object_property_iter_next(iter))) { ... } object_property_iter_free(iter); This has the benefit that the ObjectPropertyIterator struct can be opaque, but has the downside that callers need to explicitly call a free function. It is also not in keeping with iterator style used elsewhere in QEMU/GLib2. This patch changes the API to use stack allocation instead: ObjectPropertyIterator iter; object_property_iter_init(&iter, obj); while ((prop = object_property_iter_next(&iter))) { ... } Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [AF: Fused ObjectPropertyIterator struct with typedef] Signed-off-by: Andreas Färber <afaerber@suse.de> |
||
---|---|---|
.. | ||
Makefile.objs | ||
e500-ccsr.h | ||
e500.c | ||
e500.h | ||
e500plat.c | ||
mac.h | ||
mac_newworld.c | ||
mac_oldworld.c | ||
mpc8544_guts.c | ||
mpc8544ds.c | ||
ppc.c | ||
ppc4xx_devs.c | ||
ppc4xx_pci.c | ||
ppc405.h | ||
ppc405_boards.c | ||
ppc405_uc.c | ||
ppc440_bamboo.c | ||
ppc_booke.c | ||
ppce500_spin.c | ||
prep.c | ||
spapr.c | ||
spapr_drc.c | ||
spapr_events.c | ||
spapr_hcall.c | ||
spapr_iommu.c | ||
spapr_pci.c | ||
spapr_pci_vfio.c | ||
spapr_rng.c | ||
spapr_rtas.c | ||
spapr_rtc.c | ||
spapr_vio.c | ||
virtex_ml507.c |