diff options
author | Karl Williamson <khw@cpan.org> | 2021-07-01 18:47:45 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-08-14 06:47:43 -0600 |
commit | 22afef87083fc7ad1b066588f5c20637fd387805 (patch) | |
tree | 74f540e111eb7fbc989150361b1b375861af608a /embed.fnc | |
parent | 2e5a4e5adeeaafbc8743371293762d71bf27ea15 (diff) | |
download | perl-22afef87083fc7ad1b066588f5c20637fd387805.tar.gz |
is_utf8_valid_partial_char_flags: Use DFA
The DFA macro for determining if a sequence is valid UTF-8 was
deliberately made general enough to accommodate this use-case, in which
only a partial character is acceptable. Change the code to use the DFA.
The helper function's name is changed to indicate it is private
Diffstat (limited to 'embed.fnc')
-rw-r--r-- | embed.fnc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1203,9 +1203,9 @@ ATidp |bool |is_utf8_fixed_width_buf_loclen_flags \ |NN const U8 * const s|STRLEN len \ |NULLOK const U8 **ep|NULLOK STRLEN *el|const U32 flags AmTdP |bool |is_utf8_valid_partial_char \ - |NN const U8 * const s|NN const U8 * const e + |NN const U8 * const s0|NN const U8 * const e ATidRp |bool |is_utf8_valid_partial_char_flags \ - |NN const U8 * const s|NN const U8 * const e|const U32 flags + |NN const U8 * const s0|NN const U8 * const e|const U32 flags CpR |bool |_is_uni_FOO|const U8 classnum|const UV c CpR |bool |_is_utf8_FOO|const U8 classnum|NN const U8 *p \ |NN const U8 * const e |