[PATCH] wcsmbs: Avoid escaped character literals in <wchar.h>
Andreas Schwab
schwab@suse.de
Mon Feb 17 16:07:00 GMT 2020
On Feb 17 2020, Florian Weimer wrote:
> Subject: Add wide and character literal support to conform/conformtest.py
>
> Without this change, tokens such as L'x7f' are reconginzed as a
> identifiers L, x7f, which are not in the implementation namespace and
> therefore trigger failures.
>
> diff --git a/conform/conformtest.py b/conform/conformtest.py
> index 951e3b2420..3bdc2a8e57 100644
> --- a/conform/conformtest.py
> +++ b/conform/conformtest.py
> @@ -638,7 +638,7 @@ class HeaderTests(object):
> # constants, and hex floats may be wrongly split into
> # tokens including identifiers, but this is sufficient
> # in practice and matches the old perl script.
> - line = re.sub(r'"[^"]*"', '', line)
> + line = re.sub(r'(?:\bL)?(?:"[^"]*"|\'[^\']*\')', '', line)
> line = line.strip()
> for token in re.split(r'[^A-Za-z0-9_]+', line):
> if re.match(r'[A-Za-z_]', token):
Ok if you update the comment.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Libc-alpha
mailing list