This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
[perl5.git] / pp_hot.c
index 4d458ad..7d28d33 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1636,7 +1636,7 @@ Perl_do_readline(pTHX)
 
            if (SvCUR(sv) > 0 && SvCUR(PL_rs) > 0) {
                tmps = SvEND(sv) - 1;
-               if (*tmps == *SvPVX(PL_rs)) {
+               if (*tmps == *SvPVX_const(PL_rs)) {
                    *tmps = '\0';
                    SvCUR_set(sv, SvCUR(sv) - 1);
                }
@@ -1645,7 +1645,7 @@ Perl_do_readline(pTHX)
                if (!isALPHA(*tmps) && !isDIGIT(*tmps) &&
                    strchr("$&*(){}[]'\";\\|?<>~`", *tmps))
                        break;
-           if (*tmps && PerlLIO_lstat(SvPVX(sv), &PL_statbuf) < 0) {
+           if (*tmps && PerlLIO_lstat(SvPVX_const(sv), &PL_statbuf) < 0) {
                (void)POPs;             /* Unmatched wildcard?  Chuck it... */
                continue;
            }
@@ -1883,7 +1883,7 @@ PP(pp_iter)
                    *itersvp = newSVsv(cur);
                    SvREFCNT_dec(oldsv);
                }
-               if (strEQ(SvPVX(cur), max))
+               if (strEQ(SvPVX_const(cur), max))
                    sv_setiv(cur, 0); /* terminate next time */
                else
                    sv_inc(cur);
@@ -2187,7 +2187,7 @@ PP(pp_subst)
                                 REXEC_NOT_FIRST|REXEC_IGNOREPOS));
            if (s != d) {
                i = strend - s;
-               SvCUR_set(TARG, d - SvPVX(TARG) + i);
+               SvCUR_set(TARG, d - SvPVX_const(TARG) + i);
                Move(s, d, i+1, char);          /* include the NUL */
            }
            TAINT_IF(rxtainted & 1);
@@ -2609,7 +2609,7 @@ PP(pp_entersub)
                mg_get(sv);
                if (SvROK(sv))
                    goto got_rv;
-               sym = SvPOKp(sv) ? SvPVX(sv) : Nullch;
+               sym = SvPOKp(sv) ? SvPVX_const(sv) : Nullch;
            }
            else {
                 STRLEN n_a;