X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=scope.c;h=48063160680c7a58cb4f10e4d032fc58d47f5b2d;hb=863811b26c8593d84b9f78cd2addb031ca7b315e;hp=04fbec1a7c543ad6f295e6d98f824f277a2fab2e;hpb=27cc343c4fb8030e5afb7c3824647d9e5e1d08d6;p=p5sagit%2Fp5-mst-13.2.git diff --git a/scope.c b/scope.c index 04fbec1..4806316 100644 --- a/scope.c +++ b/scope.c @@ -46,7 +46,7 @@ PERL_SI * Perl_new_stackinfo(pTHX_ I32 stitems, I32 cxitems) { PERL_SI *si; - New(56, si, 1, PERL_SI); + Newx(si, 1, PERL_SI); si->si_stack = newAV(); AvREAL_off(si->si_stack); av_extend(si->si_stack, stitems > 0 ? stitems-1 : 0); @@ -57,7 +57,7 @@ Perl_new_stackinfo(pTHX_ I32 stitems, I32 cxitems) si->si_cxmax = cxitems - 1; si->si_cxix = -1; si->si_type = PERLSI_UNDEF; - New(56, si->si_cxstack, cxitems, PERL_CONTEXT); + Newx(si->si_cxstack, cxitems, PERL_CONTEXT); /* Without any kind of initialising PUSHSUBST() * in pp_subst() will read uninitialised heap. */ Poison(si->si_cxstack, cxitems, PERL_CONTEXT); @@ -169,7 +169,7 @@ S_save_scalar_at(pTHX_ SV **sptr) SV * Perl_save_scalar(pTHX_ GV *gv) { - SV **sptr = &GvSV(gv); + SV ** const sptr = &GvSV(gv); PL_localizing = 1; SvGETMAGIC(*sptr); PL_localizing = 0; @@ -254,7 +254,7 @@ Perl_save_gp(pTHX_ GV *gv, I32 empty) if (empty) { register GP *gp; - Newz(602, gp, 1, GP); + Newxz(gp, 1, GP); if (GvCVu(gv)) PL_sub_generation++; /* taking a method out of circulation */ @@ -623,7 +623,7 @@ Perl_leave_scope(pTHX_ I32 base) register GV *gv; register AV *av; register HV *hv; - register void* ptr; + void* ptr; register char* str; I32 i; @@ -963,8 +963,8 @@ Perl_leave_scope(pTHX_ I32 base) case SAVEt_SAVESWITCHSTACK: { dSP; - AV* t = (AV*)SSPOPPTR; - AV* f = (AV*)SSPOPPTR; + AV* const t = (AV*)SSPOPPTR; + AV* const f = (AV*)SSPOPPTR; SWITCHSTACK(t,f); PL_curstackinfo->si_stack = f; } @@ -1091,6 +1091,8 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx) PTR2UV(cx->sb_rxres)); break; } +#else + PERL_UNUSED_ARG(cx); #endif /* DEBUGGING */ }