X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=sv.c;h=8c9b17abed9a7b250db0fd14ee5ae993c9c9964d;hb=8177d4d97c5035e1ca045371b1be47a2ef66ec1d;hp=17371cba9abf4bd1b46a60d58993b27858e2798d;hpb=327014894ced3ae73d401ac084a318bdc616e5d8;p=p5sagit%2Fp5-mst-13.2.git diff --git a/sv.c b/sv.c index 17371cb..8c9b17a 100644 --- a/sv.c +++ b/sv.c @@ -9670,12 +9670,6 @@ Perl_sv_vcatpvfn(pTHX_ SV *const sv, const char *const pat, const STRLEN patlen, if (args) { eptr = va_arg(*args, char*); if (eptr) -#ifdef MACOS_TRADITIONAL - /* On MacOS, %#s format is used for Pascal strings */ - if (alt) - elen = *eptr++; - else -#endif elen = strlen(eptr); else { eptr = (char *)nullstr; @@ -10501,7 +10495,8 @@ Perl_gp_dup(pTHX_ GP *const gp, CLONE_PARAMS *const param) ptr_table_store(PL_ptr_table, gp, ret); /* clone */ - ret->gp_refcnt = 0; /* must be before any other dups! */ + /* ret->gp_refcnt must be 0 before any other dups are called. We're relying + on Newxz() to do this for us. */ ret->gp_sv = sv_dup_inc(gp->gp_sv, param); ret->gp_io = io_dup_inc(gp->gp_io, param); ret->gp_form = cv_dup_inc(gp->gp_form, param); @@ -10960,8 +10955,7 @@ Perl_sv_dup(pTHX_ const SV *const sstr, CLONE_PARAMS *const param) LvTARG(dstr) = sv_dup_inc(LvTARG(dstr), param); case SVt_PVGV: if(isGV_with_GP(sstr)) { - if (GvNAME_HEK(dstr)) - GvNAME_HEK(dstr) = hek_dup(GvNAME_HEK(dstr), param); + GvNAME_HEK(dstr) = hek_dup(GvNAME_HEK(dstr), param); /* Don't call sv_add_backref here as it's going to be created as part of the magic cloning of the symbol table. */ @@ -11059,7 +11053,7 @@ Perl_sv_dup(pTHX_ const SV *const sstr, CLONE_PARAMS *const param) SvFLAGS(dstr) |= SVf_OOK; hvname = saux->xhv_name; - daux->xhv_name = hvname ? hek_dup(hvname, param) : hvname; + daux->xhv_name = hek_dup(hvname, param); daux->xhv_riter = saux->xhv_riter; daux->xhv_eiter = saux->xhv_eiter