summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-10 22:06:53 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-10 22:06:53 +0000
commit86c29d75e7a3f6437747e5739890c22532d1c305 (patch)
treebc9b961d889b678e99ed04b73d1f0addec62e012 /regexec.c
parent92313705724966605b57f67693b747d56f75db80 (diff)
downloadperl-86c29d75e7a3f6437747e5739890c22532d1c305.tar.gz
It seems that you don't need to reference count PL_reg_curpm without
ithreads, so don't waste time doing it there. p4raw-id: //depot/perl@32939
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/regexec.c b/regexec.c
index 5ce1ee3de1..3a7d461d28 100644
--- a/regexec.c
+++ b/regexec.c
@@ -2264,10 +2264,15 @@ S_regtry(pTHX_ regmatch_info *reginfo, char **startpos)
}
#endif
}
+#ifdef USE_ITHREADS
+ /* It seems that non-ithreads works both with and without this code.
+ So for efficiency reasons it seems best not to have the code
+ compiled when it is not needed. */
/* This is safe against NULLs: */
ReREFCNT_dec(PM_GETRE(PL_reg_curpm));
/* PM_reg_curpm owns a reference to this regexp. */
ReREFCNT_inc(rx);
+#endif
PM_SETRE(PL_reg_curpm, rx);
PL_reg_oldcurpm = PL_curpm;
PL_curpm = PL_reg_curpm;