On Tue, Jun 3, 2014 at 5:51 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: > Il 02/06/2014 04:40, Peter Crosthwaite ha scritto: > >>> > { >>> > MemoryRegion *mr = MEMORY_REGION(obj); >>> > + gchar *container_link_type = g_strdup_printf("link<%s>", >>> > + TYPE_MEMORY_REGION); >> >> Since TYPE_MEMORY_REGION is a literal string constant, this can be >> done with regular "" "" style string concatenation. Dropped the strdup >> in V3. > > > Note that object_resolve_path_component expects link<FOO> properties to have > a LinkProperty stored in prop->opaque. Does this hold in your case? >
Probably not. Using canonical paths through links would not work in this case. Nice catch. > Perhaps we can instead add a new ->resolve function pointer to properties. > The other option is we open up the check fn from object_property_add_link as being usable for setter side-effects. No change of code, just I guess "check" would then be a wrong name. Then there's no need for a low-level link. Probably easier than yet another fn hook. Regards, Peter > Paolo >