On Thu, Nov 12, 2020 at 09:11:48AM +0100, Paolo Bonzini wrote: > On 11/11/20 19:39, Eduardo Habkost wrote: > > I will submit v3 of this series with both > > object_class_property_add_field() and > > object_class_add_field_properties() as internal QOM APIs. > > object_class_add_field_properties() will be used to implement > > device_class_set_props(). > > I have no problem making both of them public APIs. If an object can use > only a single array of static^Wfield properties that's totally fine; I'm > just not sure about splitting properties between class_init and static > arrays, which is the less consistent case.
I agree that using a static array for a couple of properties and object_class_property_add*() for all the rest isn't desirable. Making both APIs public sounds like a good plan. I'd like us to make almost every object use only an array (just like almost every device already use only an array, today), but maybe we'll hit too many obstacles trying to do that. We'll see. -- Eduardo