Change 30101 by [EMAIL PROTECTED] on 2007/02/02 22:10:39

        A few more places where we know the length for sv_setpv() or sv_catpv()

Affected files ...

... //depot/perl/mg.c#476 edit
... //depot/perl/op.c#891 edit
... //depot/perl/pp_ctl.c#598 edit
... //depot/perl/toke.c#745 edit

Differences ...

==== //depot/perl/mg.c#476 (text) ====
Index: perl/mg.c
--- perl/mg.c#475~29910~        2007-01-21 15:11:30.000000000 -0800
+++ perl/mg.c   2007-02-02 14:10:39.000000000 -0800
@@ -1186,7 +1186,7 @@
 #endif
            /* cache state so we don't fetch it again */
            if(sigstate == (Sighandler_t) SIG_IGN)
-               sv_setpv(sv,"IGNORE");
+               sv_setpvs(sv,"IGNORE");
            else
                sv_setsv(sv,&PL_sv_undef);
            PL_psig_ptr[i] = SvREFCNT_inc_simple_NN(sv);

==== //depot/perl/op.c#891 (text) ====
Index: perl/op.c
--- perl/op.c#890~30085~        2007-01-31 04:14:05.000000000 -0800
+++ perl/op.c   2007-02-02 14:10:39.000000000 -0800
@@ -4899,7 +4899,7 @@
 
        if (gv)
            gv_efullname3(name = sv_newmortal(), gv, NULL);
-       sv_setpv(msg, "Prototype mismatch:");
+       sv_setpvs(msg, "Prototype mismatch:");
        if (name)
            Perl_sv_catpvf(aTHX_ msg, " sub %"SVf, SVfARG(name));
        if (SvPOK(cv))

==== //depot/perl/pp_ctl.c#598 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#597~29921~    2007-01-22 11:21:21.000000000 -0800
+++ perl/pp_ctl.c       2007-02-02 14:10:39.000000000 -0800
@@ -2971,7 +2971,7 @@
        }
        else {
            if (!*msg) {
-               sv_setpv(ERRSV, "Compilation error");
+               sv_setpvs(ERRSV, "Compilation error");
            }
        }
        PERL_UNUSED_VAR(newsp);

==== //depot/perl/toke.c#745 (text) ====
Index: perl/toke.c
--- perl/toke.c#744~30030~      2007-01-27 06:03:01.000000000 -0800
+++ perl/toke.c 2007-02-02 14:10:39.000000000 -0800
@@ -1026,10 +1026,10 @@
            /* XXX these shouldn't really be added here, can't set 
PL_faketokens */
            if (PL_minus_p) {
 #ifdef PERL_MAD
-               sv_catpv(PL_linestr,
+               sv_catpvs(PL_linestr,
                         ";}continue{print or die qq(-p destination: $!\\n);}");
 #else
-               sv_setpv(PL_linestr,
+               sv_setpvs(PL_linestr,
                         ";}continue{print or die qq(-p destination: $!\\n);}");
 #endif
                PL_minus_n = PL_minus_p = 0;
@@ -6599,8 +6599,8 @@
                    if (PL_madskills)
                        nametoke = newSVpvn(s, d - s);
 #endif
-                   if (strchr(tmpbuf, ':'))
-                       sv_setpv(PL_subname, tmpbuf);
+                   if (memchr(tmpbuf, ':', len))
+                       sv_setpvn(PL_subname, tmpbuf, len);
                    else {
                        sv_setsv(PL_subname,PL_curstname);
                        sv_catpvs(PL_subname,"::");
End of Patch.

Reply via email to