summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2001-07-12 11:48:06 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2001-07-12 12:33:57 +0000
commit09687e5a07994ac5284915dd5873add3f29dda9e (patch)
tree0dc9f2ddb41067015c546659992a316139ae86cd /regexec.c
parent74fa30a54217d79d8d390198372c9736c695bcf8 (diff)
downloadperl-09687e5a07994ac5284915dd5873add3f29dda9e.tar.gz
fix for PMOP threadness failures
Message-ID: <B77322D6.22DD%artur@contiller.se> p4raw-id: //depot/perl@11299
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index b5f8f4759a..0e780d0915 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1850,8 +1850,17 @@ S_regtry(pTHX_ regexp *prog, char *startpos)
PL_reg_oldpos = mg->mg_len;
SAVEDESTRUCTOR_X(restore_pos, 0);
}
- if (!PL_reg_curpm)
+ if (!PL_reg_curpm) {
Newz(22,PL_reg_curpm, 1, PMOP);
+#ifdef USE_ITHREADS
+ {
+ SV* repointer = newSViv(0);
+ av_push(PL_regex_padav,repointer);
+ PL_reg_curpm->op_pmoffset = av_len(PL_regex_padav);
+ PL_regex_pad = AvARRAY(PL_regex_padav);
+ }
+#endif
+ }
PM_SETRE(PL_reg_curpm, prog);
PL_reg_oldcurpm = PL_curpm;
PL_curpm = PL_reg_curpm;