[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification"
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification" |
Date: |
Thu, 13 Nov 2014 09:08:52 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Paolo Bonzini <address@hidden> writes:
> On 12/11/2014 18:08, Markus Armbruster wrote:
>> "Automatic arrayification" is a convenience feature for creating a
>> bunch of properties with a common type, accessors and so forth, named
>> in a peculiar way: "foo[0]", "foo[1]", ... It's implemented by making
>> property names ending with "[*]" magical. The magic is uncalled for,
>> as names can be just as well generated separately from adding
>> properties.
>>
>> See also
>> https://lists.nongnu.org/archive/html/qemu-devel/2014-10/msg00623.html
>
> I dislike having the caller free the property name. It is decent as you
> used it here, but it won't be usable if we later try and avoid making
> all memory region names array-ified.
>
> I like the idea, but the API is just too ugly. :( Unfortunately I have
> nothing better to propose.
For what it's worth, three out of four uses already need to free,
because they append "[*]" to an argument string.
Can you explain what you mean by "avoid making all memory region names
array-ified", and why my API won't be usable for that?
- [Qemu-devel] [PATCH 1/4] qom: New object_gen_new_property_name(), (continued)
[Qemu-devel] [PATCH 3/4] qdev: Use object_gen_new_property_name() instead of "arrayification", Markus Armbruster, 2014/11/12
Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Paolo Bonzini, 2014/11/12
- Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification",
Markus Armbruster <=
- Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Paolo Bonzini, 2014/11/13
- Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Markus Armbruster, 2014/11/13
- Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Paolo Bonzini, 2014/11/13
- Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Markus Armbruster, 2014/11/14
- Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Paolo Bonzini, 2014/11/14
- Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Markus Armbruster, 2014/11/14