diff options
author | Karl Williamson <khw@cpan.org> | 2021-06-26 19:57:03 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-08-07 05:14:44 -0600 |
commit | 58b66e89ba80b4f91ff12da18da1301aa182a687 (patch) | |
tree | db91351c2e183774b4b816c78fd842d73872bc98 /proto.h | |
parent | 527347e0493f4ee24d63df996fd6616806422d17 (diff) | |
download | perl-58b66e89ba80b4f91ff12da18da1301aa182a687.tar.gz |
Add helper function for longest UTF8 sequence
This specialized functionality is used to check the validity of Perl's
extended-length UTF-8, which has some ideosyncratic characteristics from
the shorter sequences. This means this function doesn't have to
consider those differences. It will be used in the next commit to avoid
some work, and to eventually enable is_utf8_char_helper() to be
simplified.
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1708,6 +1708,12 @@ PERL_STATIC_INLINE bool Perl_is_strict_utf8_string_loclen(const U8 *s, STRLEN le #define PERL_ARGS_ASSERT_IS_STRICT_UTF8_STRING_LOCLEN \ assert(s) #endif +PERL_CALLCONV Size_t Perl_is_utf8_FF_helper_(const U8 * const s0, const U8 * const e, const bool require_partial) + __attribute__warn_unused_result__ + __attribute__pure__; +#define PERL_ARGS_ASSERT_IS_UTF8_FF_HELPER_ \ + assert(s0); assert(e) + #ifndef NO_MATHOMS PERL_CALLCONV STRLEN Perl_is_utf8_char(const U8 *s) __attribute__deprecated__; |