qemu-e2k/net
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
..
checksum.c
clients.h
dump.c trivial patches for 2016-01-11 2016-01-11 12:56:58 +00:00
eth.c
filter-buffer.c
filter.c qom: Change object property iterator API contract 2016-01-18 17:47:58 +01:00
hub.c
hub.h
l2tpv3.c l2tpv3: fix cookie decoding 2016-01-11 11:01:35 +08:00
Makefile.objs
net.c qapi: Don't let implicit enum MAX member collide 2015-12-17 08:21:28 +01:00
netmap.c net: netmap: use error_setg() helpers in place of error_report() 2015-11-12 15:31:52 +08:00
queue.c
slirp.c
socket.c
tap_int.h
tap-aix.c
tap-bsd.c
tap-haiku.c
tap-linux.c
tap-linux.h
tap-solaris.c
tap-win32.c tap-win32: disable broken async write path 2015-11-27 10:39:55 +08:00
tap.c
util.c
util.h
vde.c
vhost-user.c error: Strip trailing '\n' from error string arguments (again) 2016-01-13 15:16:18 +01:00