|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers |
Date: | Thu, 02 Feb 2012 20:29:59 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 |
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: object_property_set_qobject, object_property_set, qdev_set_*) to implement these type-safe accessors on top of dynamic properties.
2) If we want to get fancy, we can add property_set_int, etc. and then implement (1) via header files that just call these functions.That's what patch 5 does. But writing visitors in C is a royal PITA. The only sane way to do so is via QObject.
BTW, I don't really think it's possible to proceed on this except by accepting compromises. We need to be the #1 QOM client, _now_ or it will remain buggy & bitrot.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |