summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-07-01 18:48:10 -0600
committerKarl Williamson <khw@cpan.org>2021-08-14 06:47:43 -0600
commit1aa501c28abd51b6253fb6da3caeee66320bf274 (patch)
tree34755745c3dffee562186389cedada7b54c88bc0 /proto.h
parent22f363ffd253b5142b1138438c30f34da9494d4a (diff)
downloadperl-1aa501c28abd51b6253fb6da3caeee66320bf274.tar.gz
utf8.c: Refactor is_utf8_char_helper()
Now that the DFA is used by the only callers to this to eliminate the need to check for e.g., wrong continuation bytes, this function can be refactored to use a switch statement, which makes it clearer, shorter, and faster. The name is changed to indicate its private nature
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/proto.h b/proto.h
index 16080febb6..effb8ea2f2 100644
--- a/proto.h
+++ b/proto.h
@@ -1733,10 +1733,10 @@ PERL_CALLCONV STRLEN Perl_is_utf8_char_buf(const U8 *buf, const U8 *buf_end);
#define PERL_ARGS_ASSERT_IS_UTF8_CHAR_BUF \
assert(buf); assert(buf_end)
#endif
-PERL_CALLCONV STRLEN Perl_is_utf8_char_helper(const U8 * const s, const U8 * e, const U32 flags)
+PERL_CALLCONV STRLEN Perl_is_utf8_char_helper_(const U8 * const s, const U8 * e, const U32 flags)
__attribute__warn_unused_result__
__attribute__pure__;
-#define PERL_ARGS_ASSERT_IS_UTF8_CHAR_HELPER \
+#define PERL_ARGS_ASSERT_IS_UTF8_CHAR_HELPER_ \
assert(s); assert(e)
/* PERL_CALLCONV bool is_utf8_fixed_width_buf_flags(const U8 * const s, STRLEN len, const U32 flags); */