Paolo Bonzini writes:
> On 14/11/2014 15:21, Markus Armbruster wrote:
>> qdev properties can easily use object_gen_new_property_name() instead,
>> as shown in PATCH 3/4.
>>
>> So can memory regions [PATCH 2/4], but only because we clumsily arrayify
>> all of them, by appending "[*]" in memory_re
On 14/11/2014 15:21, Markus Armbruster wrote:
> qdev properties can easily use object_gen_new_property_name() instead,
> as shown in PATCH 3/4.
>
> So can memory regions [PATCH 2/4], but only because we clumsily arrayify
> all of them, by appending "[*]" in memory_region_init().
>
> Some day, w
Paolo Bonzini writes:
> On 13/11/2014 15:34, Markus Armbruster wrote:
>> -... "bla" ...
>> +char *name = object_gen_new_property_name(obj, "bla");
>> +... name ...
>> +g_free(name);
>>
>> Not quite as mechanical, in particular finding the obj to pass to
>> object_gen_new_property
On 13/11/2014 15:34, Markus Armbruster wrote:
> -... "bla" ...
> +char *name = object_gen_new_property_name(obj, "bla");
> +... name ...
> +g_free(name);
>
> Not quite as mechanical, in particular finding the obj to pass to
> object_gen_new_property_name().
>
> Correct?
Yes (ex
Paolo Bonzini writes:
> On 13/11/2014 09:08, Markus Armbruster wrote:
>>> >
>>> > 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 argume
On 13/11/2014 09:08, Markus Armbruster wrote:
>> >
>> > 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.
Yes, your API wor
Paolo Bonzini 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
>> propert
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 "[*]" ma
"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