Skip to content

Commit f0ca328

Browse files
committed
RExC_state_t: convert uni_semantics to boolean
1 parent 449cfab commit f0ca328

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

regcomp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
16691669
/* Set to use unicode semantics if the pattern is in utf8 and has the
16701670
* 'depends' charset specified, as it means unicode when utf8 */
16711671
set_regex_charset(&rx_flags, REGEX_UNICODE_CHARSET);
1672-
RExC_uni_semantics = 1;
1672+
RExC_uni_semantics = true;
16731673
}
16741674

16751675
RExC_pm_flags = pm_flags;

regcomp_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ struct RExC_state_t {
131131
bool orig_utf8; /* whether the pattern was originally in utf8 */
132132
/* XXX use this for future optimisation of case
133133
* where pattern must be upgraded to utf8. */
134-
I32 uni_semantics; /* If a d charset modifier should use unicode
134+
bool uni_semantics; /* If a d charset modifier should use unicode
135135
rules, even if the pattern is not in
136136
utf8 */
137137

@@ -497,7 +497,7 @@ struct RExC_state_t {
497497
STMT_START { \
498498
if (DEPENDS_SEMANTICS) { \
499499
set_regex_charset(&RExC_flags, REGEX_UNICODE_CHARSET); \
500-
RExC_uni_semantics = 1; \
500+
RExC_uni_semantics = true; \
501501
if (RExC_seen_d_op && LIKELY(! IN_PARENS_PASS)) { \
502502
/* No need to restart the parse if we haven't seen \
503503
* anything that differs between /u and /d, and no need \

0 commit comments

Comments
 (0)