[Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Paolo Bonzini
Move the creation of QmpInputVisitor and QmpOutputVisitor from qmp.c to qom/object.c, since it's the only practical way to access object properties. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/qemu/object.h | 24 qmp.c | 17

Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Anthony Liguori
On 02/02/2012 10:45 AM, Paolo Bonzini wrote: Move the creation of QmpInputVisitor and QmpOutputVisitor from qmp.c to qom/object.c, since it's the only practical way to access object properties. Signed-off-by: Paolo Bonzinipbonz...@redhat.com --- include/qemu/object.h | 24

Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Paolo Bonzini
On 02/02/2012 08:06 PM, Anthony Liguori wrote: I don't want object.h to have a dependency on QObject. We need to phase out QObject. The header doesn't. Couple things: 1) We shouldn't use generic interfaces to read/write properties from objects. We should use type-safe accessors provided by

Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Andreas Färber
Am 02.02.2012 20:06, schrieb Anthony Liguori: On 02/02/2012 10:45 AM, Paolo Bonzini wrote: Move the creation of QmpInputVisitor and QmpOutputVisitor from qmp.c to qom/object.c, since it's the only practical way to access object properties. Signed-off-by: Paolo Bonzinipbonz...@redhat.com ---

Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Paolo Bonzini
On 02/02/2012 08:24 PM, Paolo Bonzini wrote: 1) We shouldn't use generic interfaces to read/write properties from objects. We should use type-safe accessors provided by the types themselves. That doesn't change the fact that we need simple wrappers using C types (at various levels:

Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Anthony Liguori
On 02/02/2012 01:24 PM, Paolo Bonzini wrote: On 02/02/2012 08:06 PM, Anthony Liguori wrote: I don't want object.h to have a dependency on QObject. We need to phase out QObject. The header doesn't. Couple things: 1) We shouldn't use generic interfaces to read/write properties from objects.

Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Anthony Liguori
On 02/02/2012 01:29 PM, Paolo Bonzini wrote: On 02/02/2012 08:24 PM, Paolo Bonzini wrote: 1) We shouldn't use generic interfaces to read/write properties from objects. We should use type-safe accessors provided by the types themselves. That doesn't change the fact that we need simple

Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Paolo Bonzini
On 02/02/2012 08:36 PM, Anthony Liguori wrote: The only types that matter are int and string so the variant visitor is pretty simple. Sure, only ~150 lines of code. I also do not disagree with the goals (mine and yours), just with the priorities. :) Paolo

Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Anthony Liguori
On 02/02/2012 01:21 PM, Andreas Färber wrote: Am 02.02.2012 20:06, schrieb Anthony Liguori: On 02/02/2012 10:45 AM, Paolo Bonzini wrote: Move the creation of QmpInputVisitor and QmpOutputVisitor from qmp.c to qom/object.c, since it's the only practical way to access object properties.

Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Anthony Liguori
On 02/02/2012 02:08 PM, Paolo Bonzini wrote: On 02/02/2012 08:36 PM, Anthony Liguori wrote: The only types that matter are int and string so the variant visitor is pretty simple. Sure, only ~150 lines of code. I also do not disagree with the goals (mine and yours), just with the priorities.