qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/6] target-i386: Register QOM properties for fe


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 3/6] target-i386: Register QOM properties for feature flags
Date: Wed, 08 Apr 2015 14:24:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


On 08/04/2015 14:20, Eduardo Habkost wrote:
>> > it would be better to create generic bit property and replace above code 
>> > with it
>> > something similar to object_property_add_uint32_ptr()
> object_property_add_*_ptr() adds read-only properties, and I didn't want
> to make object_property_add_bit_ptr() inconsistent with the other
> functions. But maybe it is better to have an inconsistent but reusable
> API than making the new code non-reusable by keeping it inside
> target-i386/cpu.c. I will give it a try.

add_*_ptr() is read-only because read-only properties do not require
validations (at least that's the common case).  So I think the
inconsistent API is worse than a local one.

> BTW, it is on my wishlist to remove the existing duplication in
> DEFINE_PROP_*(), QAPI, and object_property_add_*(), that are supposed to
> support the same data types without duplicating code, but this may take
> a while.

Yeah, that would be nice...

Paolo



reply via email to

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