diff options
author | Andy Lester <andy@petdance.com> | 2005-05-09 17:45:00 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-09 20:07:14 +0000 |
commit | f54cb97a39f1a5849851e77a33524dfca2644cf5 (patch) | |
tree | 63ac7dcf435b959ee157bc3bd9c11eb775192034 /pp_ctl.c | |
parent | a0981a788197c6d427ceaf558d0dc8713c7737b3 (diff) | |
download | perl-f54cb97a39f1a5849851e77a33524dfca2644cf5.tar.gz |
attributes-two.patch, the next batch
Message-ID: <20050509154518.GA18273@petdance.com>
p4raw-id: //depot/perl@24431
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 35 |
1 files changed, 17 insertions, 18 deletions
@@ -931,7 +931,7 @@ PP(pp_mapstart) PP(pp_mapwhile) { dVAR; dSP; - I32 gimme = GIMME_V; + const I32 gimme = GIMME_V; I32 items = (SP - PL_stack_base) - *PL_markstack_ptr; /* how many new items */ I32 count; I32 shift; @@ -1138,7 +1138,7 @@ PP(pp_flop) else { SV *final = sv_mortalcopy(right); STRLEN len, n_a; - char *tmps = SvPV(final, len); + const char *tmps = SvPV(final, len); sv = sv_mortalcopy(left); SvPV_force(sv,n_a); @@ -1228,7 +1228,7 @@ S_dopoptolabel(pTHX_ const char *label) I32 Perl_dowantarray(pTHX) { - I32 gimme = block_gimme(); + const I32 gimme = block_gimme(); return (gimme == G_VOID) ? G_SCALAR : gimme; } @@ -1543,10 +1543,8 @@ PP(pp_caller) register PERL_CONTEXT *cx; register PERL_CONTEXT *ccstack = cxstack; PERL_SI *top_si = PL_curstackinfo; - I32 dbcxix; I32 gimme; const char *stashname; - SV *sv; I32 count = 0; if (MAXARG) @@ -1577,7 +1575,7 @@ PP(pp_caller) cx = &ccstack[cxix]; if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) { - dbcxix = dopoptosub_at(ccstack, cxix - 1); + const I32 dbcxix = dopoptosub_at(ccstack, cxix - 1); /* We expect that ccstack[dbcxix] is CXt_SUB, anyway, the field below is defined for any cx. */ /* caller() should not report the automatic calls to &DB::sub */ @@ -1612,7 +1610,7 @@ PP(pp_caller) GV *cvgv = CvGV(ccstack[cxix].blk_sub.cv); /* So is ccstack[dbcxix]. */ if (isGV(cvgv)) { - sv = NEWSV(49, 0); + SV * const sv = NEWSV(49, 0); gv_efullname3(sv, cvgv, Nullch); PUSHs(sv_2mortal(sv)); PUSHs(sv_2mortal(newSViv((I32)cx->blk_sub.hasargs))); @@ -1739,7 +1737,7 @@ PP(pp_dbstate) dSP; register CV *cv; register PERL_CONTEXT *cx; - I32 gimme = G_ARRAY; + const I32 gimme = G_ARRAY; U8 hasargs; GV *gv; @@ -1781,7 +1779,7 @@ PP(pp_enteriter) { dVAR; dSP; dMARK; register PERL_CONTEXT *cx; - I32 gimme = GIMME_V; + const I32 gimme = GIMME_V; SV **svp; U32 cxtype = CXt_LOOP; #ifdef USE_ITHREADS @@ -1868,7 +1866,7 @@ PP(pp_enterloop) { dVAR; dSP; register PERL_CONTEXT *cx; - I32 gimme = GIMME_V; + const I32 gimme = GIMME_V; ENTER; SAVETMPS; @@ -2618,7 +2616,7 @@ PP(pp_exit) PP(pp_nswitch) { dSP; - NV value = SvNVx(GvSV(cCOP->cop_gv)); + const NV value = SvNVx(GvSV(cCOP->cop_gv)); register I32 match = I_32(value); if (value < 0.0) { @@ -2662,10 +2660,10 @@ S_save_lines(pTHX_ AV *array, SV *sv) { register const char *s = SvPVX(sv); register const char *send = SvPVX(sv) + SvCUR(sv); - register const char *t; register I32 line = 1; while (s && s < send) { + const char *t; SV *tmpstr = NEWSV(85,0); sv_upgrade(tmpstr, SVt_PVMG); @@ -3014,7 +3012,7 @@ STATIC PerlIO * S_doopen_pm(pTHX_ const char *name, const char *mode) { #ifndef PERL_DISABLE_PMC - STRLEN namelen = strlen(name); + const STRLEN namelen = strlen(name); PerlIO *fp; if (namelen > 3 && strEQ(name + namelen - 3, ".pm")) { @@ -3056,9 +3054,8 @@ PP(pp_require) char *tryname = Nullch; SV *namesv = Nullsv; SV** svp; - I32 gimme = GIMME_V; + const I32 gimme = GIMME_V; PerlIO *tryrsfp = 0; - STRLEN n_a; int filter_has_file = 0; GV *filter_child_proc = 0; SV *filter_state = 0; @@ -3243,6 +3240,7 @@ PP(pp_require) || (*name == ':' && name[1] != ':' && strchr(name+2, ':')) #endif ) { + STRLEN n_a; char *dir = SvPVx(dirsv, n_a); #ifdef MACOS_TRADITIONAL char buf1[256]; @@ -3306,7 +3304,8 @@ PP(pp_require) sv_catpv(msg, " (did you run h2ph?)"); sv_catpv(msg, " (@INC contains:"); for (i = 0; i <= AvFILL(ar); i++) { - char *dir = SvPVx(*av_fetch(ar, i, TRUE), n_a); + STRLEN n_a; + const char *dir = SvPVx(*av_fetch(ar, i, TRUE), n_a); Perl_sv_setpvf(aTHX_ dirmsgsv, " %s", dir); sv_catsv(msg, dirmsgsv); } @@ -3393,7 +3392,7 @@ PP(pp_entereval) dVAR; dSP; register PERL_CONTEXT *cx; dPOPss; - I32 gimme = GIMME_V, was = PL_sub_generation; + const I32 gimme = GIMME_V, was = PL_sub_generation; char tbuf[TYPE_DIGITS(long) + 12]; char *tmpbuf = tbuf; char *safestr; @@ -3544,7 +3543,7 @@ PP(pp_entertry) { dVAR; dSP; register PERL_CONTEXT *cx; - I32 gimme = GIMME_V; + const I32 gimme = GIMME_V; ENTER; SAVETMPS; |