[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH memory v2 7/9] memory: MemoryRegion: Add contain
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [PATCH memory v2 7/9] memory: MemoryRegion: Add container and addr props |
Date: |
Tue, 3 Jun 2014 18:52:41 +1000 |
On Tue, Jun 3, 2014 at 5:51 PM, Paolo Bonzini <address@hidden> 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
>