[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
- Re: [PATCH v2 05/18] vl: merge -accel processing into configure_accelerators, (continued)
- [PATCH v2 03/18] tcg: move qemu_tcg_configure to accel/tcg/tcg-all.c, Paolo Bonzini, 2019/12/09
- [PATCH v2 06/18] accel: compile accel/accel.c just once, Paolo Bonzini, 2019/12/09
- [PATCH v2 09/18] vl: warn for unavailable accelerators, clarify messages, Paolo Bonzini, 2019/12/09
- [PATCH v2 11/18] qom: add object_new_with_class, Paolo Bonzini, 2019/12/09
- [PATCH v2 08/18] vl: configure accelerators from -accel options, Paolo Bonzini, 2019/12/09
- [PATCH v2 12/18] accel: pass object to accel_init_machine, Paolo Bonzini, 2019/12/09
- [PATCH v2 07/18] vl: introduce object_parse_property_opt, Paolo Bonzini, 2019/12/09
- [PATCH v2 13/18] tcg: convert "-accel threads" to a QOM property, Paolo Bonzini, 2019/12/09
- [PATCH v2 10/18] qom: introduce object_register_sugar_prop, Paolo Bonzini, 2019/12/09
- [PATCH v2 14/18] tcg: add "-accel tcg, tb-size" and deprecate "-tb-size", Paolo Bonzini, 2019/12/09