[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] qom: Allow object_property_add_child() to fail
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH] qom: Allow object_property_add_child() to fail |
Date: |
Tue, 23 Jun 2020 18:22:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 23/06/20 17:54, Eric Auger wrote:
> This patch introduces two new functions, object_property_add_err() and
> object_property_add_child_err() whose prototype features an error handle.
> object_property_add_child_err() now gets called from user_creatable_add_type.
> This solution was chosen instead of changing the prototype of existing
> functions because the number of existing callers is huge.
The idea is good, but I would rather name the functions
object_property_try_add{,_child} to follow e.g. g_try_malloc.
In fact, the existing function object_property_try_add can simply be
made non-static.
Paolo