qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 5/8] qom: add object_new_with_props / object_


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH v5 5/8] qom: add object_new_with_props / object_new_withpropv constructors
Date: Fri, 19 Jun 2015 18:43:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Am 19.06.2015 um 18:17 schrieb Eric Blake:
> On 06/19/2015 10:08 AM, Andreas Färber wrote:
>> Am 19.06.2015 um 18:04 schrieb Eric Blake:
>>> On 05/27/2015 09:07 AM, Daniel P. Berrange wrote:
>>>> It is reasonably common to want to create an object, set a
>>>> number of properties, register it in the hierarchy and then
>>>> mark it as complete (if a user creatable type). This requires
>>>> quite a lot of error prone, verbose, boilerplate code to achieve.
>>>>
>>>
>>>>  /**
>>>> + * object_new_with_props:
>>>> + * @typename:  The name of the type of the object to instantiate.
>>>> + * @parent: the parent object
>>>> + * @id: The unique ID of the object
>>>> + * @errp: pointer to error object
>>>> + * @...: list of property names and values
>>>> + *
>>>> + * This function will initialize a new object using heap allocated memory.
>>>> + * The returned object has a reference count of 1, and will be freed when
>>>> + * the last reference is dropped.
>>>> + *
>>>> + * The @id parameter will be used when registering the object as a
>>>> + * child of @parent in the objects composition tree.
>>>
>>> s/objects/object's/
>>
>> Actually I think /objects is meant, so looks okay to me?
> 
> Then s,objects,/objects, :)
> 
> Yes, that reads okay as well (and now you see why adding a character,
> whether / or ', makes a difference).

Erm, on second thoughts "object composition tree" is meant. :) The
parent is specified by the caller. And since that file always just talks
of "composition tree" except for one case where it says "QOM composition
tree", let's just adapt to that.

Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB
21284 (AG Nürnberg)

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]