Re: [Qemu-devel] [PATCH] Add object_property_get_child().

2012-02-20 Thread Paolo Bonzini
On 02/20/2012 12:13 PM, Alexander Barabash wrote: > I would only suggest that the documentation of object_property_add_child() > be amended to reflect the fact that the child object may be retrieved using > object_property_get_link(). Sure, feel free to post a patch for that or to add a synonym wi

Re: [Qemu-devel] [PATCH] Add object_property_get_child().

2012-02-20 Thread Alexander Barabash
On 02/20/2012 11:11 AM, Paolo Bonzini wrote: On 02/19/2012 01:36 PM, Alexander Barabash wrote: The proposed object_property_get_child() may return either the direct child with the specified name in the composition tree, or the value of the link with the specified name, as object_property_get_li

Re: [Qemu-devel] [PATCH] Add object_property_get_child().

2012-02-20 Thread Paolo Bonzini
On 02/19/2012 01:36 PM, Alexander Barabash wrote: > > > The proposed object_property_get_child() may return either > the direct child with the specified name in the composition tree, > or the value of the link with the specified name, as > object_property_get_link() indeed does. Have you actuall

Re: [Qemu-devel] [PATCH] Add object_property_get_child().

2012-02-19 Thread Alexander Barabash
On 02/17/2012 12:17 PM, Paolo Bonzini wrote: Besides the non-triviality of the patch, how is this different from object_property_get_link? Perhaps we should just rename that one to object_property_get_obj, or add a function that is just a synonym. As for the patch's (non-)triviality, I just want

Re: [Qemu-devel] [PATCH] Add object_property_get_child().

2012-02-17 Thread Paolo Bonzini
Besides the non-triviality of the patch, how is this different from object_property_get_link? Perhaps we should just rename that one to object_property_get_obj, or add a function that is just a synonym. > + */ > +Object *object_property_get_child(Object *obj, const char *name, > +

Re: [Qemu-devel] [PATCH] Add object_property_get_child().

2012-02-16 Thread Peter Maydell
On 16 February 2012 17:39, Alexander Barabash wrote: > >    Add object_property_get_child(). > >    Adding a direct accessor to a child property. > >    In the existing implementation, object_property_get() must be used, >    with with a visitor, implementing the 'type_str' callback, >    receivin

[Qemu-devel] [PATCH] Add object_property_get_child().

2012-02-16 Thread Alexander Barabash
Add object_property_get_child(). Adding a direct accessor to a child property. In the existing implementation, object_property_get() must be used, with with a visitor, implementing the 'type_str' callback, receiving the child's canonical path. In the new implementation,