Re: [libvirt] [PATCH 05/11] util: use glib string allocation/formatting functions

2019-10-04 Thread Daniel P . Berrangé
On Mon, Sep 30, 2019 at 01:35:36PM +0200, Pavel Hrdina wrote: > On Fri, Sep 27, 2019 at 06:17:27PM +0100, Daniel P. Berrangé wrote: > > Convert the string duplication APIs to use the g_strdup family of APIs. > > > > Annoyingly our virVasprintf/virAsprintf functions return the character > > count,

Re: [libvirt] [PATCH 05/11] util: use glib string allocation/formatting functions

2019-09-30 Thread Ján Tomko
On Mon, Sep 30, 2019 at 12:42:56PM +0100, Daniel P. Berrangé wrote: On Mon, Sep 30, 2019 at 01:35:36PM +0200, Pavel Hrdina wrote: On Fri, Sep 27, 2019 at 06:17:27PM +0100, Daniel P. Berrangé wrote: > Convert the string duplication APIs to use the g_strdup family of APIs. > > Annoyingly our

Re: [libvirt] [PATCH 05/11] util: use glib string allocation/formatting functions

2019-09-30 Thread Daniel P . Berrangé
On Mon, Sep 30, 2019 at 01:35:36PM +0200, Pavel Hrdina wrote: > On Fri, Sep 27, 2019 at 06:17:27PM +0100, Daniel P. Berrangé wrote: > > Convert the string duplication APIs to use the g_strdup family of APIs. > > > > Annoyingly our virVasprintf/virAsprintf functions return the character > > count,

Re: [libvirt] [PATCH 05/11] util: use glib string allocation/formatting functions

2019-09-30 Thread Pavel Hrdina
On Fri, Sep 27, 2019 at 06:17:27PM +0100, Daniel P. Berrangé wrote: > Convert the string duplication APIs to use the g_strdup family of APIs. > > Annoyingly our virVasprintf/virAsprintf functions return the character > count, even though 90% of our usage doesn't need it. To retain compat > with

Re: [libvirt] [PATCH 05/11] util: use glib string allocation/formatting functions

2019-09-30 Thread Daniel P . Berrangé
On Mon, Sep 30, 2019 at 01:32:50PM +0200, Ján Tomko wrote: > On Mon, Sep 30, 2019 at 10:37:53AM +0200, Peter Krempa wrote: > > On Fri, Sep 27, 2019 at 18:17:27 +0100, Daniel Berrange wrote: > > > Convert the string duplication APIs to use the g_strdup family of APIs. > > > > > > Annoyingly our

Re: [libvirt] [PATCH 05/11] util: use glib string allocation/formatting functions

2019-09-30 Thread Ján Tomko
On Mon, Sep 30, 2019 at 10:37:53AM +0200, Peter Krempa wrote: On Fri, Sep 27, 2019 at 18:17:27 +0100, Daniel Berrange wrote: Convert the string duplication APIs to use the g_strdup family of APIs. Annoyingly our virVasprintf/virAsprintf functions return the character count, even though 90% of

Re: [libvirt] [PATCH 05/11] util: use glib string allocation/formatting functions

2019-09-30 Thread Peter Krempa
On Fri, Sep 27, 2019 at 18:17:27 +0100, Daniel Berrange wrote: > Convert the string duplication APIs to use the g_strdup family of APIs. > > Annoyingly our virVasprintf/virAsprintf functions return the character > count, even though 90% of our usage doesn't need it. To retain compat > with these

[libvirt] [PATCH 05/11] util: use glib string allocation/formatting functions

2019-09-27 Thread Daniel P . Berrangé
Convert the string duplication APIs to use the g_strdup family of APIs. Annoyingly our virVasprintf/virAsprintf functions return the character count, even though 90% of our usage doesn't need it. To retain compat with these semantics we have a call to strlen which costs CPU time. We previously