From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rt2qn-0004cc-AS for qemu-devel@nongnu.org; Thu, 02 Feb 2012 15:01:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rt2qi-0002ix-UE for qemu-devel@nongnu.org; Thu, 02 Feb 2012 15:01:45 -0500 Received: from mail-pz0-f45.google.com ([209.85.210.45]:33414) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rt2qi-0002iq-OB for qemu-devel@nongnu.org; Thu, 02 Feb 2012 15:01:40 -0500 Received: by dadp14 with SMTP id p14so2691103dad.4 for ; Thu, 02 Feb 2012 12:01:39 -0800 (PST) Message-ID: <4F2AEB9F.6010705@codemonkey.ws> Date: Thu, 02 Feb 2012 14:01:35 -0600 From: Anthony Liguori 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> <4F2AE437.8070502@redhat.com> In-Reply-To: <4F2AE437.8070502@redhat.com> 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: Paolo Bonzini Cc: qemu-devel@nongnu.org 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 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. Not disagreeing at all with the goal, just the implementation :-) We can pretty easily avoid a QObject dependency. I can throw together that patch if you'd like. Regards, Anthony Liguori > > Paolo >