From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SenDc-00009v-UW for qemu-devel@nongnu.org; Wed, 13 Jun 2012 09:02:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SenDb-0001Jw-8j for qemu-devel@nongnu.org; Wed, 13 Jun 2012 09:02:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SenDb-0001Jn-0u for qemu-devel@nongnu.org; Wed, 13 Jun 2012 09:02:39 -0400 Message-ID: <4FD88F4B.20603@redhat.com> Date: Wed, 13 Jun 2012 15:02:03 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <76ad34dd30a83d96a97bc7443245ee9c165e053f.1339578989.git.peter.crosthwaite@petalogix.com> <4FD8658C.700@redhat.com> <4FD86B35.90000@suse.de> <4FD86EAA.1060005@redhat.com> <4FD88E95.8060806@suse.de> In-Reply-To: <4FD88E95.8060806@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC v0 5/8] object: make interfaces concrete List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, qemu-devel@nongnu.org, "Peter A. G. Crosthwaite" , paul@codesourcery.com, Anthony Liguori , edgar.iglesias@gmail.com, john.williams@petalogix.com, avi@redhat.com Il 13/06/2012 14:59, Andreas F=E4rber ha scritto: > Ouch! One can argue that's still not recursive, but what matters more > this borks Anthony's in-place object_initialize() concept. >=20 > Two solutions come to mind: > * allocate the interfaces as part of object_new() beyond instance_size That won't work if you initialize in place, because you cannot allocate the room for the interface. It is possible to put Interface objects explicitly in the class, and pass an offset when registering the type so that they can be initialized in place. But I still think we're fighting windmills... Paolo