Il 05/03/2014 10:24, Andreas Färber ha scritto:
Am 05.03.2014 09:14, schrieb Paolo Bonzini:
Il 04/03/2014 22:45, Stefan Hajnoczi ha scritto:
There are two problems with QOM link properties:
1. There are refcount leaks in many object_property_add_link() callers.
2. There is no way to prevent link properties from being set after a
device is
realized.
This patch series fixes these issues by extending the
object_property_add_link() function.
Thanks for looking into this! Just two (mostly) cosmetic comments:
1) in patch 2 we could use a flags argument instead of a "bool". This
is more easily extensible and self-documenting.
I wonder if we can do this more cleverly: The two ways a link<> property
can get set that I can think of are either a) assigning the field a new
value in C code or b) using object_property_set_link() with a textual
path. Can't the latter simply save an unref flag within the property's
opaque when used?
Sounds too magic...
Paolo