summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regcomp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index c60ab84409..b0fd6da71f 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -1963,7 +1963,10 @@ S_reg(pTHX_ I32 paren, I32 *flagp)
else
sv = newSVpvn("", 0);
+ ENTER;
+ Perl_save_re_context(aTHX);
rop = sv_compile_2op(sv, &sop, "re", &av);
+ LEAVE;
n = add_data(3, "nop");
PL_regcomp_rx->data->data[n] = (void*)rop;