[patch perlguts.pod] save_item doesn't handle magic
[p5sagit/p5-mst-13.2.git] / sv.c
diff --git a/sv.c b/sv.c
index bc53cc4..98f19c5 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -9507,6 +9507,9 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
            continue;   /* not "break" */
        }
 
+       /* calculate width before utf8_upgrade changes it */
+       have = esignlen + zeros + elen;
+
        if (is_utf8 != has_utf8) {
             if (is_utf8) {
                  if (SvCUR(sv))
@@ -9530,7 +9533,6 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
                "Newline in left-justified string for %sprintf",
                        (PL_op->op_type == OP_PRTF) ? "" : "s");
        
-       have = esignlen + zeros + elen;
        need = (have > width ? have : width);
        gap = need - have;
 
@@ -10830,7 +10832,7 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
            break;
        case SAVEt_COMPPAD:
            av = (AV*)POPPTR(ss,ix);
-           TOPPTR(nss,ix) = av_dup_inc(av, param);
+           TOPPTR(nss,ix) = av_dup(av, param);
            break;
        case SAVEt_PADSV:
            longval = (long)POPLONG(ss,ix);
@@ -11466,14 +11468,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
     PL_last_swash_tmps = (U8*)NULL;
     PL_last_swash_slen = 0;
 
-    /* perly.c globals */
-    PL_yydebug         = proto_perl->Iyydebug;
-    PL_yynerrs         = proto_perl->Iyynerrs;
-    PL_yyerrflag       = proto_perl->Iyyerrflag;
-    PL_yychar          = proto_perl->Iyychar;
-    PL_yyval           = proto_perl->Iyyval;
-    PL_yylval          = proto_perl->Iyylval;
-
     PL_glob_index      = proto_perl->Iglob_index;
     PL_srand_called    = proto_perl->Isrand_called;
     PL_hash_seed       = proto_perl->Ihash_seed;