qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 01/27] qom: add the base Object class


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 01/27] qom: add the base Object class
Date: Tue, 03 Jan 2012 09:57:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

On 01/03/2012 02:18 AM, Anthony Liguori wrote:

2) Why do you need a list for the interface objects at all? You can make
obj->interfaces point to a single blob, and initialize the objects in
place. You
only need to store the number of interfaces into the TypeImpl or in
the object
header, or add a dummy Interface at the end whose contents are all-zero.

Interfaces aren't really handled in a special way.  You could easily
make it so that the infrastructure could be modified to allow true
multiple inheritance.

I'm not sure I see an obvious benefit to making interfaces handled more
as a special case.  Right now, the only place that really even knows
about interfaces is dynamic_cast and initialization.  That seems like a
good thing to me.

That wouldn't really be a special case, not any more than initializing a device's child in-place within the parent struct.

Anyhow, nothing that can't be done as a followup.  Will review v2 now.

Paolo



reply via email to

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