diff options
author | Karl Williamson <khw@cpan.org> | 2021-06-27 02:19:19 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-08-07 05:14:43 -0600 |
commit | 8b5f2733d203f1d4c77d2a7e2250f5b63c17c9e9 (patch) | |
tree | 4d780adf97c32e8aca95b22269706a4d19ab62a8 /proto.h | |
parent | d49e4ce1792863bdc3e344a52aef19110508e1ac (diff) | |
download | perl-8b5f2733d203f1d4c77d2a7e2250f5b63c17c9e9.tar.gz |
utf8.c: Generalize static fcn
I've always been uncomfortable with the input constraints this function
had. Now that it has been refactored into using a switch(), new cases
for full generality can be added without affecting performance, and
some conditionals removed before calling it.
The function is renamed to reflect its more generality
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6647,9 +6647,9 @@ PERL_STATIC_INLINE bool S_is_utf8_common(pTHX_ const U8 *const p, const U8 *cons #endif #ifndef PERL_NO_INLINE_FUNCTIONS -PERL_STATIC_INLINE int S_is_utf8_overlong_given_start_byte_ok(const U8 * const s, const STRLEN len) +PERL_STATIC_INLINE int S_is_utf8_overlong(const U8 * const s, const STRLEN len) __attribute__warn_unused_result__; -#define PERL_ARGS_ASSERT_IS_UTF8_OVERLONG_GIVEN_START_BYTE_OK \ +#define PERL_ARGS_ASSERT_IS_UTF8_OVERLONG \ assert(s) #endif |