qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 11/18] qom: add object_new_with_class


From: Paolo Bonzini
Subject: Re: [PATCH v2 11/18] qom: add object_new_with_class
Date: Mon, 9 Dec 2019 18:14:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

On 09/12/19 16:31, Philippe Mathieu-Daudé wrote:
> On 12/9/19 4:01 PM, Paolo Bonzini wrote:
>>     /**
>> + * object_new_with_class:
>> + * @klass: The class to instantiate.
>> + *
>> + * 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.
>> + *
>> + * Returns: The newly allocated and instantiated object.
>> + */
>> +Object *object_new_with_class(ObjectClass *klass);
> 
> The function name bugs me... Pick your poison?
> 
>   object_new_by_class
>   object_new_of_class
>   object_new_for_class
>   object_new_from_class
>   object_new_with_class
> 
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

>From and with both make sense, I just picked the one consistent with
object_new_with_type.

Paolo




reply via email to

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