unicorn/qemu/qom
Daniel P. Berrange eddfb13c2c
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))) {
...
}

Backports commit 7746abd8e9ee9db20c0b0fdb19504f163ba3cbea from qemu
2018-02-21 21:03:58 -05:00
..
container.c qom: Allow properties to be registered against classes 2018-02-21 21:00:56 -05:00
cpu.c cpu: Add callback to check architectural watchpoint match 2018-02-20 11:43:56 -05:00
Makefile.objs import 2015-08-21 15:04:50 +08:00
object.c qom: Change object property iterator API contract 2018-02-21 21:03:58 -05:00
qom-qobject.c qapi: Consistent generated code: prefer visitor 'v' 2018-02-19 18:21:53 -05:00