unicorn/qemu/qom
Daniel P. Berrange 3ba8959dfd
qom: Introduce ObjectPropertyIterator struct for iteration
Some users of QOM need to be able to iterate over properties
defined against an object instance. Currently they are just
directly using the QTAIL macros against the object properties
data structure.

This is bad because it exposes them to changes in the data
structure used to store properties, as well as changes in
functionality such as ability to register properties against
the class.

This provides an ObjectPropertyIterator struct which will
insulate the callers from the particular data structure
used to store properties. It can be used thus

ObjectProperty *prop;
ObjectPropertyIterator *iter;

iter = object_property_iter_init(obj);
while ((prop = object_property_iter_next(iter))) {
... do something with prop ...
}
object_property_iter_free(iter);

Backports commit a00c94824126901168bca5b89147f9e334a49e87 from qemu
2018-02-17 18:39:00 -05:00
..
container.c Automated leading tab to spaces conversion. 2017-01-21 12:28:22 +11:00
cpu.c cpu: initialize cpu->exception_index on reset 2018-02-17 15:23:51 -05:00
Makefile.objs
object.c qom: Introduce ObjectPropertyIterator struct for iteration 2018-02-17 18:39:00 -05:00
qom-qobject.c