qemu/include
Daniel P. Berrange 7746abd8e9 qom: Change object property iterator API contract
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>
2016-01-18 17:47:58 +01:00
..
block nbd: Always call "close_fn" in nbd_client_new 2016-01-15 18:58:01 +01:00
crypto crypto: Fix typo in example 2016-01-11 11:39:28 +03:00
disas disas: Add print_insn to disassemble info 2015-07-09 15:20:40 +02:00
exec ivshmem: Store file descriptor for vhost-user negotiation 2016-01-09 23:20:20 +02:00
fpu softfloat: expand out STATUS macro 2015-02-06 16:11:38 +00:00
hw qemu-sparc update 2016-01-18 09:33:36 +00:00
io io: add QIOChannelBuffer class 2015-12-18 12:18:31 +00:00
libdecnumber Fix new typos in comments (found by codespell) 2014-07-18 17:45:36 +04:00
migration vmstate: Introduce VMSTATE_VARRAY_MULTPLY 2016-01-16 12:01:23 +00:00
monitor monitor/target-ppc: Define target_get_monitor_def 2015-11-12 14:53:36 +11:00
net ether/slirp: Avoid redefinition of the same constants 2016-01-11 11:01:35 +08:00
qapi error: New error_prepend(), error_reportf_err() 2016-01-13 15:16:17 +01:00
qemu qemu-char: delete send_all/recv_all helper methods 2016-01-15 18:58:01 +01:00
qom qom: Change object property iterator API contract 2016-01-18 17:47:58 +01:00
standard-headers linux-headers: update from kvm/next 2015-12-17 15:24:34 +01:00
sysemu qemu-char: add logfile facility to all chardev backends 2016-01-15 18:58:02 +01:00
ui gtk: implement set_echo 2016-01-18 16:36:21 +01:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h elf: add arm note types 2016-01-15 14:55:16 +00:00
glib-compat.h glib: add compatibility interface for g_hash_table_add() 2015-10-30 09:01:03 +01:00
qemu-common.h osdep.h: Include glib-compat.h in osdep.h rather than qemu-common.h 2016-01-11 11:39:28 +03:00
qemu-io.h qemu-io: Use BlockBackend 2015-02-16 15:07:19 +00:00
qjson.h QJSON: Add JSON writer 2015-02-05 17:16:14 +01:00
trace-tcg.h trace: [tcg] Generate TCG tracing routines 2014-08-12 14:26:12 +01:00
trace.h trace: [tcg] Include event definitions in "trace.h" 2014-08-12 14:26:12 +01:00