From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rt2MF-0007H8-QO for qemu-devel@nongnu.org; Thu, 02 Feb 2012 14:30:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rt2M9-0003uE-RB for qemu-devel@nongnu.org; Thu, 02 Feb 2012 14:30:11 -0500 Received: from mail-ee0-f45.google.com ([74.125.83.45]:38320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rt2M9-0003qU-Mk for qemu-devel@nongnu.org; Thu, 02 Feb 2012 14:30:05 -0500 Received: by eekd17 with SMTP id d17so925531eek.4 for ; Thu, 02 Feb 2012 11:30:02 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4F2AE437.8070502@redhat.com> Date: Thu, 02 Feb 2012 20:29:59 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1328201142-26145-1-git-send-email-pbonzini@redhat.com> <1328201142-26145-5-git-send-email-pbonzini@redhat.com> <4F2ADEB0.6090308@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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