Re: [PATCH] qapi: define cleanup function for g_autoptr(Error)

2021-09-13 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 9/13/21 3:08 PM, Markus Armbruster wrote: >> Markus Armbruster writes: [...] >> As is, reporting errors doesn't play well with g_autoptr(). Example: >> >> Error *err = NULL; >> >> ... code that may set @err ... >> >> if (error is serious) { >

Re: [PATCH] qapi: define cleanup function for g_autoptr(Error)

2021-09-13 Thread Philippe Mathieu-Daudé
On 9/13/21 3:08 PM, Markus Armbruster wrote: > Markus Armbruster writes: > >> Paolo Bonzini writes: >> >>> On 13/09/21 07:23, Markus Armbruster wrote: Paolo Bonzini writes: > Allow replacing calls to error_free() with g_autoptr(Error) > declarations. > > Signed-off-by:

Re: [PATCH] qapi: define cleanup function for g_autoptr(Error)

2021-09-13 Thread Markus Armbruster
Markus Armbruster writes: > Paolo Bonzini writes: > >> On 13/09/21 07:23, Markus Armbruster wrote: >>> Paolo Bonzini writes: >>> Allow replacing calls to error_free() with g_autoptr(Error) declarations. Signed-off-by: Paolo Bonzini --- include/qapi/error.h | 2

Re: [PATCH] qapi: define cleanup function for g_autoptr(Error)

2021-09-13 Thread Markus Armbruster
Paolo Bonzini writes: > On 13/09/21 07:23, Markus Armbruster wrote: >> Paolo Bonzini writes: >> >>> Allow replacing calls to error_free() with g_autoptr(Error) >>> declarations. >>> >>> Signed-off-by: Paolo Bonzini >>> --- >>> include/qapi/error.h | 2 ++ >>> 1 file changed, 2 insertions(+)

Re: [PATCH] qapi: define cleanup function for g_autoptr(Error)

2021-09-13 Thread Daniel P . Berrangé
On Mon, Sep 13, 2021 at 09:30:07AM +0200, Paolo Bonzini wrote: > On 13/09/21 07:23, Markus Armbruster wrote: > > Paolo Bonzini writes: > > > > > Allow replacing calls to error_free() with g_autoptr(Error) > > > declarations. > > > > > > Signed-off-by: Paolo Bonzini > > > --- > > > include/qap

Re: [PATCH] qapi: define cleanup function for g_autoptr(Error)

2021-09-13 Thread Paolo Bonzini
On 13/09/21 07:23, Markus Armbruster wrote: Paolo Bonzini writes: Allow replacing calls to error_free() with g_autoptr(Error) declarations. Signed-off-by: Paolo Bonzini --- include/qapi/error.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qapi/error.h b/include/qapi/error

Re: [PATCH] qapi: define cleanup function for g_autoptr(Error)

2021-09-12 Thread Markus Armbruster
Paolo Bonzini writes: > Allow replacing calls to error_free() with g_autoptr(Error) > declarations. > > Signed-off-by: Paolo Bonzini > --- > include/qapi/error.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/qapi/error.h b/include/qapi/error.h > index 4a9260b0cc..8564657baf

Re: [PATCH] qapi: define cleanup function for g_autoptr(Error)

2021-09-12 Thread Richard Henderson
On 9/12/21 5:48 AM, Paolo Bonzini wrote: Allow replacing calls to error_free() with g_autoptr(Error) declarations. Signed-off-by: Paolo Bonzini --- include/qapi/error.h | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Richard Henderson r~

[PATCH] qapi: define cleanup function for g_autoptr(Error)

2021-09-12 Thread Paolo Bonzini
Allow replacing calls to error_free() with g_autoptr(Error) declarations. Signed-off-by: Paolo Bonzini --- include/qapi/error.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qapi/error.h b/include/qapi/error.h index 4a9260b0cc..8564657baf 100644 --- a/include/qapi/error.h +++ b/i