diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-01-08 17:35:19 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-01-08 17:35:19 +0000 |
commit | 937c6efd46f402a78d44f0b18f0e1e97c6c941d9 (patch) | |
tree | 6f750c5bc56551af2606e3efcd57ad9a71d15f51 /sv.c | |
parent | 10599a699e18a26ba9c9154ce2c01e7cf53249ce (diff) | |
download | perl-937c6efd46f402a78d44f0b18f0e1e97c6c941d9.tar.gz |
PL_regex_padav can simply be dup()ed. This is surprisingly satisfying.
p4raw-id: //depot/perl@32901
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 23 |
1 files changed, 5 insertions, 18 deletions
@@ -11256,24 +11256,11 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_regmatch_slab = NULL; /* Clone the regex array */ - PL_regex_padav = newAV(); - { - const I32 len = av_len((AV*)proto_perl->Iregex_padav); - SV* const * const regexen = AvARRAY((AV*)proto_perl->Iregex_padav); - IV i; - av_push(PL_regex_padav, sv_dup_inc_NN(regexen[0],param)); - for(i = 1; i <= len; i++) { - const SV * const regex = regexen[i]; - /* FIXME for plugins - newSViv(PTR2IV(CALLREGDUPE( - INT2PTR(REGEXP *, SvIVX(regex)), param)))) - */ - SV * const sv = sv_dup_inc((SV*) regex, param); - if (SvFLAGS(regex) & SVf_BREAK) - assert(SvFLAGS(sv) & SVf_BREAK); /* unrefcnted PL_curpm */ - av_push(PL_regex_padav, sv); - } - } + /* ORANGE FIXME for plugins, probably in the SV dup code. + newSViv(PTR2IV(CALLREGDUPE( + INT2PTR(REGEXP *, SvIVX(regex)), param)))) + */ + PL_regex_padav = av_dup_inc(proto_perl->Iregex_padav, param); PL_regex_pad = AvARRAY(PL_regex_padav); /* shortcuts to various I/O objects */ |