X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=sv.c;h=48d0e2d2313c3eef89c84ff268e1f4bc8c634928;hb=79af22e4562a90bdaa3aa9d22a11a3fa41f9c6bc;hp=48d54228d4a3e273fbbaa6d81b855164fbbc4909;hpb=ee1c5a4ed6beace0f9f941f22f8068cde74910fe;p=p5sagit%2Fp5-mst-13.2.git diff --git a/sv.c b/sv.c index 48d5422..48d0e2d 100644 --- a/sv.c +++ b/sv.c @@ -4278,8 +4278,15 @@ Perl_sv_catsv_flags(pTHX_ SV *dsv, register SV *ssv, I32 flags) if (!ssv) return; if ((spv = SvPV(ssv, slen))) { - bool sutf8 = DO_UTF8(ssv); - bool dutf8; + /* sutf8 and dutf8 were type bool, but under USE_ITHREADS, + gcc version 2.95.2 20000220 (Debian GNU/Linux) for + Linux xxx 2.2.17 on sparc64 with gcc -O2, we erroneously + get dutf8 = 0x20000000, (i.e. SVf_UTF8) even though + dsv->sv_flags doesn't have that bit set. + Andy Dougherty 12 Oct 2001 + */ + I32 sutf8 = DO_UTF8(ssv); + I32 dutf8; if (SvGMAGICAL(dsv) && (flags & SV_GMAGIC)) mg_get(dsv); @@ -9808,12 +9815,18 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, { 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, - SvREFCNT_inc( + av_push(PL_regex_padav, + sv_dup_inc(regexen[0],param)); + for(i = 1; i <= len; i++) { + if(SvREPADTMP(regexen[i])) { + av_push(PL_regex_padav, sv_dup_inc(regexen[i], param)); + } else { + av_push(PL_regex_padav, + SvREFCNT_inc( newSViv(PTR2IV(re_dup(INT2PTR(REGEXP *, SvIVX(regexen[i])), param))) - )); + )); + } } } PL_regex_pad = AvARRAY(PL_regex_padav);