Change 32039 by [EMAIL PROTECTED] on 2007/10/05 23:03:14

        In the MAD code, eliminate one Perl_sv_catpvf() and convert one
        construction to *pvs.

Affected files ...

... //depot/perl/toke.c#794 edit

Differences ...

==== //depot/perl/toke.c#794 (text) ====
Index: perl/toke.c
--- perl/toke.c#793~32035~      2007-10-05 13:31:23.000000000 -0700
+++ perl/toke.c 2007-10-05 16:03:14.000000000 -0700
@@ -3381,8 +3381,10 @@
                else
                    Perl_croak(aTHX_ "panic: yylex");
                if (PL_madskills) {
-                   SV* const tmpsv = newSVpvs("");
-                   Perl_sv_catpvf(aTHX_ tmpsv, "\\%c", *s);
+                   SV* const tmpsv = newSVpvs("\\ ");
+                   /* replace the space with the character we want to escape
+                    */
+                   SvPVX(tmpsv)[1] = *s;
                    curmad('_', tmpsv);
                }
                PL_bufptr = s + 1;
@@ -10956,8 +10958,12 @@
        PL_sublex_info.super_bufend = PL_bufend;
        PL_multi_end = 0;
        pm->op_pmflags |= PMf_EVAL;
-       while (es-- > 0)
-           sv_catpv(repl, (const char *)(es ? "eval " : "do "));
+       while (es-- > 0) {
+           if (es)
+               sv_catpvs(repl, "eval ");
+           else
+               sv_catpvs(repl, "do ");
+       }
        sv_catpvs(repl, "{");
        sv_catsv(repl, PL_lex_repl);
        if (strchr(SvPVX(PL_lex_repl), '#'))
End of Patch.

Reply via email to