X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_ctl.c;h=a0333e60b6320053fc9bfdb1ba0837663b03752a;hb=5c144d81801caa5e8317f6a38b40eb08257c47ea;hp=fbcb1c41cdbd07e20703995a23aefc4053228233;hpb=564abe232de07cdf98620f3e8fe522b3fed4c37c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_ctl.c b/pp_ctl.c index fbcb1c4..a0333e6 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -285,7 +285,7 @@ PP(pp_substcont) MAGIC *mg; I32 i; if (SvTYPE(sv) < SVt_PVMG) - (void)SvUPGRADE(sv, SVt_PVMG); + SvUPGRADE(sv, SVt_PVMG); if (!(mg = mg_find(sv, PERL_MAGIC_regex_global))) { sv_magic(sv, Nullsv, PERL_MAGIC_regex_global, Nullch, 0); mg = mg_find(sv, PERL_MAGIC_regex_global); @@ -2945,8 +2945,8 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq) lex_end(); LEAVE; if (optype == OP_REQUIRE) { - const char* msg = SvPVx(ERRSV, n_a); - SV *nsv = cx->blk_eval.old_namesv; + const char* const msg = SvPVx(ERRSV, n_a); + const SV * const nsv = cx->blk_eval.old_namesv; (void)hv_store(GvHVn(PL_incgv), SvPVX_const(nsv), SvCUR(nsv), &PL_sv_undef, 0); DIE(aTHX_ "%sCompilation failed in require", @@ -3054,9 +3054,9 @@ PP(pp_require) dVAR; dSP; register PERL_CONTEXT *cx; SV *sv; - char *name; + const char *name; STRLEN len; - char *tryname = Nullch; + const char *tryname = Nullch; SV *namesv = Nullsv; SV** svp; const I32 gimme = GIMME_V; @@ -3084,7 +3084,7 @@ PP(pp_require) RETPUSHYES; } - name = SvPV(sv, len); + name = SvPV_const(sv, len); if (!(name && len > 0 && *name)) DIE(aTHX_ "Null filename used"); TAINT_PROPER("require"); @@ -3296,7 +3296,7 @@ PP(pp_require) SvREFCNT_dec(namesv); if (!tryrsfp) { if (PL_op->op_type == OP_REQUIRE) { - char *msgstr = name; + const char *msgstr = name; if (namesv) { /* did we lookup @INC? */ SV *msg = sv_2mortal(newSVpv(msgstr,0)); SV *dirmsgsv = NEWSV(0, 0); @@ -3406,7 +3406,7 @@ PP(pp_entereval) CV* runcv; U32 seq; - if (!SvPV(sv,len)) + if (!SvPV_const(sv,len)) RETPUSHUNDEF; TAINT_PROPER("eval");