From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rt2Gk-00054a-Mu for qemu-devel@nongnu.org; Thu, 02 Feb 2012 14:24:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rt2Gi-0002bW-RP for qemu-devel@nongnu.org; Thu, 02 Feb 2012 14:24:30 -0500 Received: from plane.gmane.org ([80.91.229.3]:51834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rt2Gi-0002b9-Dn for qemu-devel@nongnu.org; Thu, 02 Feb 2012 14:24:28 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Rt2Gh-0002f0-3I for qemu-devel@nongnu.org; Thu, 02 Feb 2012 20:24:27 +0100 Received: from 93-34-182-16.ip50.fastwebnet.it ([93.34.182.16]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Feb 2012 20:24:27 +0100 Received: from pbonzini by 93-34-182-16.ip50.fastwebnet.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Feb 2012 20:24:27 +0100 From: Paolo Bonzini Date: Thu, 02 Feb 2012 20:24:17 +0100 Message-ID: References: <1328201142-26145-1-git-send-email-pbonzini@redhat.com> <1328201142-26145-5-git-send-email-pbonzini@redhat.com> <4F2ADEB0.6090308@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit In-Reply-To: <4F2ADEB0.6090308@codemonkey.ws> 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: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 the types > themselves. > > 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. Paolo