Skip to content

Commit cc8c9ac

Browse files
committed
RExC_state_t: convert recode_x_to_native to boolean
1 parent 5d7ea5c commit cc8c9ac

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

regcomp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,7 +1694,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
16941694
RExC_maxlen = 0;
16951695
RExC_in_lookaround = false;
16961696
RExC_seen_zerolen = *exp == '^' ? -1 : 0;
1697-
RExC_recode_x_to_native = 0;
1697+
RExC_recode_x_to_native = false;
16981698
RExC_in_multi_char_class = 0;
16991699

17001700
RExC_start = RExC_copy_start_in_constructed = RExC_copy_start_in_input = RExC_precomp = exp;
@@ -5453,7 +5453,7 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state,
54535453

54545454
/* The values are Unicode, and therefore have to be converted to native
54555455
* on a non-Unicode (meaning non-ASCII) platform. */
5456-
SET_recode_x_to_native(1);
5456+
SET_recode_x_to_native(true);
54575457
}
54585458

54595459
/* Here, we have the string the name evaluates to, ready to be parsed,
@@ -5479,7 +5479,7 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state,
54795479
RExC_start = save_start;
54805480
RExC_parse_set(endbrace);
54815481
RExC_end = orig_end;
5482-
SET_recode_x_to_native(0);
5482+
SET_recode_x_to_native(true);
54835483

54845484
SvREFCNT_dec_NN(substitute_parse);
54855485

regcomp_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct RExC_state_t {
142142
U32 study_chunk_recursed_bytes; /* bytes in bitmap */
143143
bool in_lookaround;
144144
bool contains_locale;
145-
I32 recode_x_to_native;
145+
bool recode_x_to_native;
146146
I32 in_multi_char_class;
147147
int code_index; /* next code_blocks[] slot */
148148
struct reg_code_blocks *code_blocks;/* positions of literal (?{})

0 commit comments

Comments
 (0)