diff options
author | Karl Williamson <khw@cpan.org> | 2021-06-25 12:59:15 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-08-07 05:14:44 -0600 |
commit | 65e4aa05ff531aa30e0844560352a4e7494f5b2d (patch) | |
tree | 136c6de0093bc2aa0358bce432826bc1138b1fb8 /utf8.h | |
parent | 7ce5b055d7e2c571c1f3b84b9d89acd333ba7618 (diff) | |
download | perl-65e4aa05ff531aa30e0844560352a4e7494f5b2d.tar.gz |
utf8.h: Refactor UTF8_IS_NONCHAR...
UTF8_IS_NONCHAR_GIVEN_THAT_NON_SUPER_AND_GE_PROBLEMATIC() is defined just
for backward compatability (though I don't think anyone uses it).
Swap which macro is the base level that the other is defined in terms of
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -979,11 +979,6 @@ non-character code points || ( UNLIKELY(UNICODE_IS_END_PLANE_NONCHAR_GIVEN_NOT_SUPER(uv)) \ && LIKELY(! UNICODE_IS_SUPER(uv)))) -/* These are now machine generated, and the 'given' clause is no longer - * applicable */ -#define UTF8_IS_NONCHAR_GIVEN_THAT_NON_SUPER_AND_GE_PROBLEMATIC(s, e) \ - cBOOL(is_NONCHAR_utf8_safe(s,e)) - /* =for apidoc Am|bool|UTF8_IS_NONCHAR|const U8 *s|const U8 *e @@ -995,8 +990,12 @@ point's representation. =cut */ -#define UTF8_IS_NONCHAR(s, e) \ - UTF8_IS_NONCHAR_GIVEN_THAT_NON_SUPER_AND_GE_PROBLEMATIC(s, e) +#define UTF8_IS_NONCHAR(s, e) is_NONCHAR_utf8_safe(s,e) + +/* This is now machine generated, and the 'given' clause is no longer + * applicable */ +#define UTF8_IS_NONCHAR_GIVEN_THAT_NON_SUPER_AND_GE_PROBLEMATIC(s, e) \ + UTF8_IS_NONCHAR(s, e) /* Surrogates, non-character code points and above-Unicode code points are * problematic in some contexts. These macros allow code that needs to check |