Il 05/02/2014 16:52, Andreas Färber ha scritto:
> +    object_property_add_link(obj, QDEV_HOTPLUG_HANDLER_PROPERTY,
> +                             TYPE_HOTPLUG_HANDLER,
> +                             (Object **)&bus->hotplug_handler, NULL);
Will/should the user ever change that property? If not, we could drop
this hunk and change the inline link-setting below to just do it the C
way. Otherwise it should probably be using &error_abort instead of NULL.

No, they shouldn't. But OTOH it's probably useful in general to _read_ the property, and links handle reference counting nicely too. It's similar to the parent_bus link.

I think we should add something like getter/setter for links like we have for object_property_add_str, because in most of the current cases the link should be read-only.

It should not hold this series, though.

Paolo

Reply via email to