diff options
author | Artur Bergman <sky@nanisky.com> | 2001-07-11 16:23:37 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-07-11 13:13:27 +0000 |
commit | 1fcf4c126eb604a2803256137e52891a03090e84 (patch) | |
tree | 0e52b9ba379dfaf92f8f13447fb6e207ec6dbe2d /op.c | |
parent | 742dc7f97e9775960295fb61b8ceb6a959d8c031 (diff) | |
download | perl-1fcf4c126eb604a2803256137e52891a03090e84.tar.gz |
Threadsafe PMOPs! We might still win this war.
Message-ID: <000b01c10a04$4fa16a10$21000a0a@vogw2kdev>
Threadsafe PMOPs for ithreads, waiting for AMS's Perl_re_dup().
p4raw-id: //depot/perl@11274
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -2952,7 +2952,16 @@ Perl_newPMOP(pTHX_ I32 type, I32 flags) pmop->op_pmpermflags |= PMf_LOCALE; pmop->op_pmflags = pmop->op_pmpermflags; - /* link into pm list */ + #ifdef USE_ITHREADS + { + SV* repointer = newSViv(0); + av_push(PL_regex_padav,repointer); + pmop->op_pmoffset = av_len(PL_regex_padav); + PL_regex_pad = AvARRAY(PL_regex_padav); + } + #endif + + /* link into pm list */ if (type != OP_TRANS && PL_curstash) { pmop->op_pmnext = HvPMROOT(PL_curstash); HvPMROOT(PL_curstash) = pmop; |