summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-08-12 22:46:12 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-08-12 22:46:12 +0000
commit84e09d5e9b0e8f355853f7c768e322224fb09c76 (patch)
tree5a2807645a588817ceccd451f28c08ab70e633e0 /pp_ctl.c
parentce6dce323a8d0f7e019f361b7d8ad8f9fea59359 (diff)
downloadperl-84e09d5e9b0e8f355853f7c768e322224fb09c76.tar.gz
Not quite so relicy as thought in #11651 (op/concat #4 and #5
stopped working). p4raw-id: //depot/perl@11653
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 8a187b04fa..1605e21684 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -121,7 +121,16 @@ PP(pp_regcomp)
PL_reginterp_cnt = I32_MAX; /* Mark as safe. */
pm->op_pmflags = pm->op_pmpermflags; /* reset case sensitivity */
+ if (DO_UTF8(tmpstr))
+ pm->op_pmdynflags |= PMdf_DYN_UTF8;
+ else {
+ pm->op_pmdynflags &= ~PMdf_DYN_UTF8;
+ if (pm->op_pmdynflags & PMdf_UTF8)
+ t = (char*)bytes_to_utf8((U8*)t, &len);
+ }
PM_SETRE(pm, CALLREGCOMP(aTHX_ t, t + len, pm));
+ if (!DO_UTF8(tmpstr) && (pm->op_pmdynflags & PMdf_UTF8))
+ Safefree(t);
PL_reginterp_cnt = 0; /* XXXX Be extra paranoid - needed
inside tie/overload accessors. */
}