qemu-devel
[Top][All Lists]
Advanced

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

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


From: Anthony Liguori
Subject: Re: [Qemu-devel] [RFC v0 5/8] object: make interfaces concrete
Date: Wed, 13 Jun 2012 08:50:53 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

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..).

Regards,

Anthony Liguori


Paolo





reply via email to

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