diff options
author | David Mitchell <davem@iabyn.com> | 2013-05-20 14:17:33 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2013-06-02 22:28:51 +0100 |
commit | 0603fe5cded5ad964b7ff06f91a5c2c244f93337 (patch) | |
tree | b6616deee0a3f0010670987085ff949e5a08c581 /pp_ctl.c | |
parent | 8adc0f72b0398cece49d44d4acc0962d03543ea9 (diff) | |
download | perl-0603fe5cded5ad964b7ff06f91a5c2c244f93337.tar.gz |
stop callers of rex engine using RX_MATCH_UTF8_set
The way that the regex engine knows that the match string is utf8 is
currently a complete mess. It's partially signalled by the utf8 flag of
the passed SV, but also by the RXf_MATCH_UTF8 flag in the regex itself,
and the value of PL_reg_match_utf8.
Currently all the callers of the engine (such as pp_match, pp_split etc)
initially use RX_MATCH_UTF8_set() before calling the engine. This sets both
the RXf_MATCH_UTF8 flag on the regex, and PL_reg_match_utf8.
Then the two entry points to the engine (regexec_flags() and
re_intuit_start()) initially repeat the RX_MATCH_UTF8_set()
themselves.
Remove the usage of RX_MATCH_UTF8_set() by the callers of the engine,
and instead just rely on the engine to do it.
Also, remove the "secret" setting of PL_reg_match_utf8 by
RX_MATCH_UTF8_set(), and do it explicitly.
This is a prelude to eliminating PL_reg_match_utf8.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -214,7 +214,6 @@ PP(pp_substcont) } rxres_restore(&cx->sb_rxres, rx); - RX_MATCH_UTF8_set(rx, DO_UTF8(cx->sb_targ)); if (cx->sb_iters++) { const I32 saviters = cx->sb_iters; |