Eduardo Habkost <ehabk...@redhat.com> writes: > The new function will allow us to iterate over class properties > using the same logic we use for object properties. Unit test > included. > > Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> > --- > Changes series v1 -> v3: > * (none) > > Changes series v3 -> v4: > * Trivial whitespace change (removed extra newline) > --- > include/qom/object.h | 14 ++++++++++++++ > qom/object.c | 10 ++++++++-- > tests/check-qom-proplist.c | 28 ++++++++++++++++++++++++++++ > 3 files changed, 50 insertions(+), 2 deletions(-) > > diff --git a/include/qom/object.h b/include/qom/object.h > index 5ecc2d1..6e3646e 100644 > --- a/include/qom/object.h > +++ b/include/qom/object.h > @@ -995,6 +995,20 @@ void object_property_iter_init(ObjectPropertyIterator > *iter, > Object *obj); > > /** > + * object_class_property_iter_init: > + * @klass: the class > + * > + * Initializes an iterator for traversing all properties > + * registered against an object class and all parent classes. > + * > + * It is forbidden to modify the property list while iterating, > + * whether removing or adding properties.
You chose not to duplicate the example from object_property_iter_init()'s function comment. That's okay, but you might want to point to it. > + */ > +void object_class_property_iter_init(ObjectPropertyIterator *iter, > + ObjectClass *klass); > + > + > +/** > * object_property_iter_next: > * @iter: the iterator instance > * [...]