summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 9b924bc0f8..444036ea7e 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -76,8 +76,8 @@ PP(pp_regcomp) {
MAGIC *mg = Null(MAGIC*);
tmpstr = POPs;
- if(SvROK(tmpstr) || SvRMAGICAL(tmpstr)) {
- SV *sv = SvROK(tmpstr) ? SvRV(tmpstr) : tmpstr;
+ if(SvROK(tmpstr)) {
+ SV *sv = SvRV(tmpstr);
if(SvMAGICAL(sv))
mg = mg_find(sv, 'r');
}
@@ -101,7 +101,6 @@ PP(pp_regcomp) {
pm->op_pmflags = pm->op_pmpermflags; /* reset case sensitivity */
pm->op_pmregexp = pregcomp(t, t + len, pm);
- sv_magic(tmpstr,(SV*)ReREFCNT_inc(pm->op_pmregexp),'r',0,0);
}
}