[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/17] qdev: remove PropertyInfo.qtype field
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 01/17] qdev: remove PropertyInfo.qtype field |
Date: |
Thu, 11 May 2017 14:07:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 |
On 11/05/2017 13:59, Markus Armbruster wrote:
>
> What I don't like is enumerating PropertyInfo in helpers. A relatively
> straightforward way to avoid this would be moving the part of
> qdev_property_add_static() that varies between properties into a new
> PropertyInfo method. Assumes that *all* instances of the same
> PropertyInfo should behave the same. Paolo, is that the case?
Yes, it is the case, and yes, a virtual method such as
void (*init_default_value)(DeviceState *dev, Property *prop)
would be much better.
Thanks,
Paolo
[Qemu-devel] [PATCH 04/17] qapi: merge QInt and QFloat in QNum, Marc-André Lureau, 2017/05/09