Skip to content

Commit a5fd0a0

Browse files
committed
Fix compilation warnings about UTF8_\w+_PERL_EXTENDED
Commit b66abe3 added these symbols to two #defines, but neglected to remove the special casing that had been used when it wasn't in them.
1 parent 82c4939 commit a5fd0a0

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

inline.h

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,8 +2075,7 @@ Perl_is_utf8_string_flags(const U8 *s, STRLEN len, const U32 flags)
20752075
const U8 * first_variant;
20762076

20772077
PERL_ARGS_ASSERT_IS_UTF8_STRING_FLAGS;
2078-
assert(0 == (flags & ~(UTF8_DISALLOW_ILLEGAL_INTERCHANGE
2079-
|UTF8_DISALLOW_PERL_EXTENDED)));
2078+
assert(0 == (flags & ~UTF8_DISALLOW_ILLEGAL_INTERCHANGE));
20802079

20812080
if (len == 0) {
20822081
len = strlen((const char *)s);
@@ -2086,13 +2085,13 @@ Perl_is_utf8_string_flags(const U8 *s, STRLEN len, const U32 flags)
20862085
return is_utf8_string(s, len);
20872086
}
20882087

2089-
if ((flags & ~UTF8_DISALLOW_PERL_EXTENDED)
2088+
if ((flags & UTF8_DISALLOW_ILLEGAL_INTERCHANGE)
20902089
== UTF8_DISALLOW_ILLEGAL_INTERCHANGE)
20912090
{
20922091
return is_strict_utf8_string(s, len);
20932092
}
20942093

2095-
if ((flags & ~UTF8_DISALLOW_PERL_EXTENDED)
2094+
if ((flags & UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE)
20962095
== UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE)
20972096
{
20982097
return is_c9strict_utf8_string(s, len);
@@ -2516,20 +2515,19 @@ Perl_is_utf8_string_loclen_flags(const U8 *s, STRLEN len, const U8 **ep, STRLEN
25162515
const U8 * first_variant;
25172516

25182517
PERL_ARGS_ASSERT_IS_UTF8_STRING_LOCLEN_FLAGS;
2519-
assert(0 == (flags & ~(UTF8_DISALLOW_ILLEGAL_INTERCHANGE
2520-
|UTF8_DISALLOW_PERL_EXTENDED)));
2518+
assert(0 == (flags & ~UTF8_DISALLOW_ILLEGAL_INTERCHANGE));
25212519

25222520
if (flags == 0) {
25232521
return is_utf8_string_loclen(s, len, ep, el);
25242522
}
25252523

2526-
if ((flags & ~UTF8_DISALLOW_PERL_EXTENDED)
2524+
if ((flags & UTF8_DISALLOW_ILLEGAL_INTERCHANGE)
25272525
== UTF8_DISALLOW_ILLEGAL_INTERCHANGE)
25282526
{
25292527
return is_strict_utf8_string_loclen(s, len, ep, el);
25302528
}
25312529

2532-
if ((flags & ~UTF8_DISALLOW_PERL_EXTENDED)
2530+
if ((flags & UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE)
25332531
== UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE)
25342532
{
25352533
return is_c9strict_utf8_string_loclen(s, len, ep, el);
@@ -2793,8 +2791,7 @@ PERL_STATIC_INLINE STRLEN
27932791
Perl_isUTF8_CHAR_flags(const U8 * const s0, const U8 * const e, const U32 flags)
27942792
{
27952793
PERL_ARGS_ASSERT_ISUTF8_CHAR_FLAGS;
2796-
assert(0 == (flags & ~(UTF8_DISALLOW_ILLEGAL_INTERCHANGE
2797-
|UTF8_DISALLOW_PERL_EXTENDED)));
2794+
assert(0 == (flags & ~UTF8_DISALLOW_ILLEGAL_INTERCHANGE));
27982795

27992796
PERL_IS_UTF8_CHAR_DFA(s0, e, PL_extended_utf8_dfa_tab,
28002797
goto check_success,
@@ -2874,8 +2871,7 @@ PERL_STATIC_INLINE bool
28742871
Perl_is_utf8_valid_partial_char_flags(const U8 * const s0, const U8 * const e, const U32 flags)
28752872
{
28762873
PERL_ARGS_ASSERT_IS_UTF8_VALID_PARTIAL_CHAR_FLAGS;
2877-
assert(0 == (flags & ~(UTF8_DISALLOW_ILLEGAL_INTERCHANGE
2878-
|UTF8_DISALLOW_PERL_EXTENDED)));
2874+
assert(0 == (flags & ~UTF8_DISALLOW_ILLEGAL_INTERCHANGE));
28792875

28802876
PERL_IS_UTF8_CHAR_DFA(s0, e, PL_extended_utf8_dfa_tab,
28812877
DFA_RETURN_FAILURE_,

utf8.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,7 @@ Perl_is_utf8_char_helper_(const U8 * const s, const U8 * e, const U32 flags)
769769
PERL_ARGS_ASSERT_IS_UTF8_CHAR_HELPER_;
770770

771771
assert(e > s);
772-
assert(0 == (flags & ~(UTF8_DISALLOW_ILLEGAL_INTERCHANGE
773-
|UTF8_DISALLOW_PERL_EXTENDED)));
772+
assert(0 == (flags & ~UTF8_DISALLOW_ILLEGAL_INTERCHANGE));
774773

775774
full_len = UTF8SKIP(s);
776775

0 commit comments

Comments
 (0)