From: Andy Lester Date: Thu, 27 Apr 2006 10:31:56 +0000 (-0500) Subject: Removing another context parm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=df528165173896ed88fc3da7e1aa8bc3ef3b2416;p=p5sagit%2Fp5-mst-13.2.git Removing another context parm Message-ID: <20060427153156.GA11445@petdance.com> p4raw-id: //depot/perl@27992 --- diff --git a/embed.fnc b/embed.fnc index 55f65fb..a1ae02f 100644 --- a/embed.fnc +++ b/embed.fnc @@ -1237,7 +1237,7 @@ sR |I32 |dopoptosub_at |NN const PERL_CONTEXT* cxstk|I32 startingblock sR |I32 |dopoptowhen |I32 startingblock s |void |save_lines |NULLOK AV *array|NN SV *sv sR |OP* |doeval |int gimme|NULLOK OP** startop|NULLOK CV* outside|U32 seq -sR |PerlIO *|check_type_and_open|NN const char *name|NN const char *mode +sRn |PerlIO *|check_type_and_open|NN const char *name|NN const char *mode sR |PerlIO *|doopen_pm |NN const char *name|NN const char *mode sRn |bool |path_is_absolute|NN const char *name sR |I32 |run_user_filter|int idx|NN SV *buf_sv|int maxlen diff --git a/embed.h b/embed.h index 8476916..8460885 100644 --- a/embed.h +++ b/embed.h @@ -3400,7 +3400,7 @@ #define dopoptowhen(a) S_dopoptowhen(aTHX_ a) #define save_lines(a,b) S_save_lines(aTHX_ a,b) #define doeval(a,b,c,d) S_doeval(aTHX_ a,b,c,d) -#define check_type_and_open(a,b) S_check_type_and_open(aTHX_ a,b) +#define check_type_and_open S_check_type_and_open #define doopen_pm(a,b) S_doopen_pm(aTHX_ a,b) #define path_is_absolute S_path_is_absolute #define run_user_filter(a,b,c) S_run_user_filter(aTHX_ a,b,c) diff --git a/pp_ctl.c b/pp_ctl.c index 485a004..c62fbec 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -3026,10 +3026,11 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq) } STATIC PerlIO * -S_check_type_and_open(pTHX_ const char *name, const char *mode) +S_check_type_and_open(const char *name, const char *mode) { Stat_t st; const int st_rc = PerlLIO_stat(name, &st); + if (st_rc < 0 || S_ISDIR(st.st_mode) || S_ISBLK(st.st_mode)) { return NULL; } @@ -3147,7 +3148,7 @@ PP(pp_require) { namesv = newSV(0); for (i = 0; i <= AvFILL(ar); i++) { - SV *dirsv = *av_fetch(ar, i, TRUE); + SV * const dirsv = *av_fetch(ar, i, TRUE); if (SvROK(dirsv)) { int count; @@ -3200,7 +3201,7 @@ PP(pp_require) } if (SvTYPE(arg) == SVt_PVGV) { - IO *io = GvIO((GV *)arg); + IO * const io = GvIO((GV *)arg); ++filter_has_file; @@ -3644,7 +3645,7 @@ Perl_create_eval_scope(pTHX_ U32 flags) PP(pp_entertry) { dVAR; - PERL_CONTEXT *cx = create_eval_scope(0); + PERL_CONTEXT * const cx = create_eval_scope(0); cx->blk_eval.retop = cLOGOP->op_other->op_next; return DOCATCH(PL_op->op_next); } @@ -3914,7 +3915,7 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other) if (c == 0) PUSHs(&PL_sv_no); else if (SvTEMP(TOPs)) - SvREFCNT_inc(TOPs); + SvREFCNT_inc_void(TOPs); FREETMPS; LEAVE; RETURN; @@ -4155,7 +4156,7 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other) if (c == 0) PUSHs(&PL_sv_undef); else if (SvTEMP(TOPs)) - SvREFCNT_inc(TOPs); + SvREFCNT_inc_void(TOPs); if (SM_OTHER_REF(PVCV)) { /* This one has to be null-proto'd too. @@ -4166,7 +4167,7 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other) if (c == 0) PUSHs(&PL_sv_undef); else if (SvTEMP(TOPs)) - SvREFCNT_inc(TOPs); + SvREFCNT_inc_void(TOPs); FREETMPS; LEAVE; PUTBACK; diff --git a/proto.h b/proto.h index bd5d285..a6e5c2f 100644 --- a/proto.h +++ b/proto.h @@ -3379,10 +3379,10 @@ STATIC void S_save_lines(pTHX_ AV *array, SV *sv) STATIC OP* S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq) __attribute__warn_unused_result__; -STATIC PerlIO * S_check_type_and_open(pTHX_ const char *name, const char *mode) +STATIC PerlIO * S_check_type_and_open(const char *name, const char *mode) __attribute__warn_unused_result__ - __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_2); + __attribute__nonnull__(1) + __attribute__nonnull__(2); STATIC PerlIO * S_doopen_pm(pTHX_ const char *name, const char *mode) __attribute__warn_unused_result__