[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] 答复: Re: [PATCH v3 1/3] qom: make base type user-creat
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] 答复: Re: [PATCH v3 1/3] qom: make base type user-creatable abstract |
Date: |
Mon, 10 Oct 2016 16:45:56 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 10/10/2016 16:32, Lin Ma wrote:
>>This doesn't make any conceptual sense. UserCreatable is an inteface and
>>by definition all interfaces are abstract.
>
> Sorry for the late reply, I was on vacation.
> oh...indeed, add '.abstract = true' for an interface is not a good idea.
Perhaps Lin Ma's patch actually made some sense. If all interfaces are
abstract, why shouldn't object_class_is_abstract say so?
The right fix then would be to add a new check in there, using
type_is_ancestor(..., type_interface). This would also fix
object_new_with_propv.
Paolo