From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SekQv-0001Nr-BN for qemu-devel@nongnu.org; Wed, 13 Jun 2012 06:04:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SekQt-0002Vq-Cn for qemu-devel@nongnu.org; Wed, 13 Jun 2012 06:04:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14833) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SekQt-0002VM-5t for qemu-devel@nongnu.org; Wed, 13 Jun 2012 06:04:11 -0400 Message-ID: <4FD8658C.700@redhat.com> Date: Wed, 13 Jun 2012 12:03:56 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <76ad34dd30a83d96a97bc7443245ee9c165e053f.1339578989.git.peter.crosthwaite@petalogix.com> In-Reply-To: <76ad34dd30a83d96a97bc7443245ee9c165e053f.1339578989.git.peter.crosthwaite@petalogix.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit 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: "Peter A. G. Crosthwaite" Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, qemu-devel@nongnu.org, paul@codesourcery.com, edgar.iglesias@gmail.com, afaerber@suse.de, john.williams@petalogix.com, avi@redhat.com Il 13/06/2012 11:38, Peter A. G. Crosthwaite ha scritto: > Objects that define interface delegate the creation of the interface object > to the interface type. These means that object_new() when called recursively by > the interface instantior is going to bork because its trying to instantiate > an abstract type. Fixed by making interface types concrete. > > Signed-off-by: Peter A. G. Crosthwaite > --- > qom/object.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/qom/object.c b/qom/object.c > index 1eba795..c3a7a47 100644 > --- a/qom/object.c > +++ b/qom/object.c > @@ -191,7 +191,7 @@ static void type_class_interface_init(TypeImpl *ti, InterfaceImpl *iface) > .parent = iface->parent, > .class_size = sizeof(InterfaceClass), > .class_init = iface->interface_initfn, > - .abstract = true, > + .abstract = false, > }; > char *name = g_strdup_printf("<%s::%s>", ti->name, iface->parent); > > Reviewed-by: Paolo Bonzini