summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-06-26 19:02:21 -0600
committerKarl Williamson <khw@cpan.org>2021-08-07 05:14:43 -0600
commit43732c4ff66897a8d76cab584f1d6c053640acd4 (patch)
tree197d0cf5a865f82f025d21cbceb3bc9b2db75c2a /utf8.h
parent99904f65f9315ad1e8da23f22b561d878bcf524c (diff)
downloadperl-43732c4ff66897a8d76cab584f1d6c053640acd4.tar.gz
Rename internal macro and move to utf8.h
This macro has a corresponding, older, name for the non-UTF-8 case. It makes sense to use the same paradigm, and move the definitions together so that the comments for one don't have to be repeated for the other.
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/utf8.h b/utf8.h
index 86340adc4a..561ec00722 100644
--- a/utf8.h
+++ b/utf8.h
@@ -780,6 +780,8 @@ case any call to string overloading updates the internal UTF-8 encoding flag.
* platforms; 30 bits on EBCDIC. */
#define UNICODE_IS_PERL_EXTENDED(uv) \
UNLIKELY((UV) (uv) > nBIT_UMAX(31 - ONE_IF_EBCDIC_ZERO_IF_NOT))
+#define UTF8_IS_PERL_EXTENDED(s) \
+ (UTF8SKIP(s) > 6 + ONE_IF_EBCDIC_ZERO_IF_NOT)
#define UTF8_ALLOW_EMPTY 0x0001 /* Allow a zero length string */
#define UTF8_GOT_EMPTY UTF8_ALLOW_EMPTY