[Top][All Lists]

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

Re: [PATCH 18/20] keyval: Use GString to accumulate value strings

From: Markus Armbruster
Subject: Re: [PATCH 18/20] keyval: Use GString to accumulate value strings
Date: Mon, 11 Jan 2021 14:05:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Paolo Bonzini <pbonzini@redhat.com> writes:

> On 11/12/20 18:11, Markus Armbruster wrote:
>> QString supports modifying its string, but it's quite limited: you can
>> only append.  The remaining callers use it for building an initial
>> string, never for modifying it later.
>> Change keyval_parse_one() to do build the initial string with
>> GString.
>> This is another step towards making QString immutable.
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> It's a bit unfortunate that the infamous "keyval: accept escaped
> commas in implied option" patch was already getting rid of mutable
> QString.
> It used a completely different mechanism, namely unescaping the string
> in place.  This means that my patch was doing n+1 allocations, versus
> a best case of n and a generic case of O(n) for this patch.  The 
> difference does not really matter, though I still like my code better.

My patch is not intended as a replacement of yours.  Mine does much

I had to choose between creating a conflict and holding back my series
while we figure out what to do with your patch.  The dilemma is my own
doing; your patch is waiting just for me.  I picked the conflict.

I can look into rebasing your patch on top of mine.

reply via email to

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