qom: add a generic mechanism to resolve paths
commit64607d088132abdb25bf30d93e97d0c8df7b364c
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 5 Jun 2014 11:11:51 +0000 (5 13:11 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 1 Jul 2014 08:17:48 +0000 (1 10:17 +0200)
treead3b8d616ee3b858d0e81ead81c2a9daefb85018
parentef7c7ff6d4ca1955278af1bc5025f47044183250
qom: add a generic mechanism to resolve paths

It may be desirable to have custom link<> properties that do more
than just store an object.  Even the addition of a "check"
function is not enough if setting the link has side effects
or if a non-standard reference counting is preferrable.

Avoid the assumption that the opaque field of a link<> is a
LinkProperty struct, by adding a generic "resolve" callback
to ObjectProperty.  This fixes aliases of link properties.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/qom/object.h
qom/object.c