Re: [Qemu-devel] [PATCH v1 RFC 06/34] qom: add a object_property_add_enum helper method

2015-04-17 Thread Daniel P. Berrange
On Fri, Apr 17, 2015 at 05:01:24PM +0200, Paolo Bonzini wrote: > > > On 17/04/2015 16:56, Paolo Bonzini wrote: > > > > > > On 17/04/2015 16:22, Daniel P. Berrange wrote: > >> A QOM property can be parsed as enum using the visit_type_enum() > >> helper method, but this forces callers to use the

Re: [Qemu-devel] [PATCH v1 RFC 06/34] qom: add a object_property_add_enum helper method

2015-04-17 Thread Daniel P. Berrange
On Fri, Apr 17, 2015 at 05:19:31PM +0200, Paolo Bonzini wrote: > > > On 17/04/2015 17:11, Daniel P. Berrange wrote: > > > On second thought (after seeing patch 7), please add a property type > > > argument here. We lose introspection of enum property types otherwise. > > > > Can you give me a p

Re: [Qemu-devel] [PATCH v1 RFC 06/34] qom: add a object_property_add_enum helper method

2015-04-17 Thread Paolo Bonzini
On 17/04/2015 17:11, Daniel P. Berrange wrote: > > On second thought (after seeing patch 7), please add a property type > > argument here. We lose introspection of enum property types otherwise. > > Can you give me a pointer to where we lose introspection ? The hostmem > code just registers its

Re: [Qemu-devel] [PATCH v1 RFC 06/34] qom: add a object_property_add_enum helper method

2015-04-17 Thread Paolo Bonzini
On 17/04/2015 16:56, Paolo Bonzini wrote: > > > On 17/04/2015 16:22, Daniel P. Berrange wrote: >> A QOM property can be parsed as enum using the visit_type_enum() >> helper method, but this forces callers to use the more complex >> generic object_property_add() method when registering it. It >>

Re: [Qemu-devel] [PATCH v1 RFC 06/34] qom: add a object_property_add_enum helper method

2015-04-17 Thread Paolo Bonzini
On 17/04/2015 16:22, Daniel P. Berrange wrote: > A QOM property can be parsed as enum using the visit_type_enum() > helper method, but this forces callers to use the more complex > generic object_property_add() method when registering it. It > also requires that users of that object have access t

[Qemu-devel] [PATCH v1 RFC 06/34] qom: add a object_property_add_enum helper method

2015-04-17 Thread Daniel P. Berrange
A QOM property can be parsed as enum using the visit_type_enum() helper method, but this forces callers to use the more complex generic object_property_add() method when registering it. It also requires that users of that object have access to the string map when they want to read the property valu