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 /sv.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 'sv.c')
-rw-r--r-- | sv.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -9693,6 +9693,19 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_statusvalue_vms = proto_perl->Istatusvalue_vms; #endif + /* Clone the regex array */ + PL_regex_padav = newAV(); + { + I32 len = av_len((AV*)proto_perl->Iregex_padav); + SV** regexen = AvARRAY((AV*)proto_perl->Iregex_padav); + for(i = 0; i <= len; i++) { + av_push(PL_regex_padav, + newSViv((IV)re_dup((REGEXP*) SvIV(regexen[i])) )); + } + } + PL_regex_pad = AvARRAY(PL_regex_padav); + + /* shortcuts to various I/O objects */ PL_stdingv = gv_dup(proto_perl->Istdingv, param); PL_stderrgv = gv_dup(proto_perl->Istderrgv, param); |