[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v0 5/8] object: make interfaces concrete

From: Edgar E. Iglesias
Subject: Re: [Qemu-devel] [RFC v0 5/8] object: make interfaces concrete
Date: Wed, 13 Jun 2012 22:22:16 +0200

this is not super on topic and might be a dumb question but now that we use glib, why aren't we using gobjects more than we are? I'm guessing the glib ppl have figured out how all this is suposed to work already...

On Jun 13, 2012 3:50 PM, "Anthony Liguori" <address@hidden> wrote:
On 06/13/2012 08:38 AM, Paolo Bonzini wrote:
Il 13/06/2012 15:36, Anthony Liguori ha scritto:

Concrete doesn't mean "instantiatable by the user".  It means
"instantiatable period".

Interfaces are not supposed to be instantiatable by anyone.  The fact
that object_new() is used to create the interface is an internal
implementation detail.

Whose side effect is that interfaces need to be concrete.

Interfaces are stateless and by definition, never have an implementation
on their own.  So object_new() of an interface type directly results in
a useless object.

Yes, and that's why you needn't really care about what the user does.
Garbage in, garbage out...

Quick chat on IRC and I think we both agree that we need to promote the notion of Interface to a first class concept in QOM.

I'll send out a patch later today (that's actually tested..).


Anthony Liguori


reply via email to

[Prev in Thread] Current Thread [Next in Thread]