Refactor routine to check for ASCII-only case

Started by Michael Paquierover 5 years ago4 messageshackers
Jump to latest
#1Michael Paquier
michael@paquier.xyz

Hi all,

As mentioned in [1]/messages/by-id/X9lVLGRuG0hTHrVo@paquier.xyz -- Michael, there are three places where there is the same
routine to check if a string is made only of ASCII characters.

This makes for a small-ish but nice cleanup, as per the attached.

Thanks,

[1]: /messages/by-id/X9lVLGRuG0hTHrVo@paquier.xyz -- Michael
--
Michael

Attachments:

ascii-refactor-v1.patchtext/x-diff; charset=us-asciiDownload+26-52
#2Heikki Linnakangas
heikki.linnakangas@enterprisedb.com
In reply to: Michael Paquier (#1)
Re: Refactor routine to check for ASCII-only case

On 18/12/2020 05:57, Michael Paquier wrote:

As mentioned in [1], there are three places where there is the same
routine to check if a string is made only of ASCII characters.

This makes for a small-ish but nice cleanup, as per the attached.

+1

- Heikki

#3Stephen Frost
sfrost@snowman.net
In reply to: Heikki Linnakangas (#2)
Re: Refactor routine to check for ASCII-only case

Greetings,

* Heikki Linnakangas (hlinnaka@iki.fi) wrote:

On 18/12/2020 05:57, Michael Paquier wrote:

As mentioned in [1], there are three places where there is the same
routine to check if a string is made only of ASCII characters.

This makes for a small-ish but nice cleanup, as per the attached.

+1

Yeah, in a quick look, this looks like a good improvement.

Thanks,

Stephen

#4Michael Paquier
michael@paquier.xyz
In reply to: Stephen Frost (#3)
Re: Refactor routine to check for ASCII-only case

On Fri, Dec 18, 2020 at 11:30:16AM -0500, Stephen Frost wrote:

* Heikki Linnakangas (hlinnaka@iki.fi) wrote:

+1

Yeah, in a quick look, this looks like a good improvement.

Thanks. This has been applied as of 93e8ff8.
--
Michael