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);
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",
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;
RETPUSHYES;
}
- name = SvPV(sv, len);
+ name = SvPV_const(sv, len);
if (!(name && len > 0 && *name))
DIE(aTHX_ "Null filename used");
TAINT_PROPER("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);
CV* runcv;
U32 seq;
- if (!SvPV(sv,len))
+ if (!SvPV_const(sv,len))
RETPUSHUNDEF;
TAINT_PROPER("eval");